blob: 01b77bc605ceb1ccc1b63e53c199f36151388393 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$NetBSD: patch-ab,v 1.1 2010/09/12 01:59:39 taca Exp $
Use modern Ruby's API.
--- swig/arg.i.orig 2002-11-10 19:02:39.000000000 +0000
+++ swig/arg.i
@@ -95,7 +95,7 @@
if (TYPE($input) != T_ARRAY) {
SWIG_exception(SWIG_ValueError, "Expected an array");
}
- $1 = RARRAY($input)->len;
+ $1 = RARRAY_LEN($input);
if ($1 == 0) {
SWIG_exception(SWIG_ValueError, "List must contain at least 1 element");
}
@@ -106,7 +106,7 @@
delete [] $2;
SWIG_exception(SWIG_ValueError, "List items must be strings");
}
- $2[i] = STR2CSTR(s);
+ $2[i] = StringValuePtr(s);
}
$2[i] = 0;
}
|