Skip to content

Commit d64d31a

Browse files
committed
Compile fixes for ruby-1.9.x
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
1 parent 830de4d commit d64d31a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Examples/ruby/multimap/example.i

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extern int gcd(int x, int y);
2020
if (TYPE($input) != T_ARRAY) {
2121
SWIG_exception(SWIG_ValueError, "Expected an array");
2222
}
23-
$1 = RARRAY($input)->len;
23+
$1 = RARRAY_LEN($input);
2424
if ($1 == 0) {
2525
SWIG_exception(SWIG_ValueError, "List must contain at least 1 element");
2626
}
@@ -47,7 +47,7 @@ extern int gcdmain(int argc, char *argv[]);
4747
SWIG_exception(SWIG_ValueError, "Expected a string");
4848
}
4949
$1 = STR2CSTR($input);
50-
$2 = RSTRING($input)->len;
50+
$2 = RSTRING_LEN($input);
5151
}
5252

5353
extern int count(char *bytes, int len, char c);
@@ -61,7 +61,7 @@ extern int count(char *bytes, int len, char c);
6161
SWIG_exception(SWIG_ValueError,"Expected a string");
6262
}
6363
temp = STR2CSTR($input);
64-
$2 = RSTRING($input)->len;
64+
$2 = RSTRING_LEN($input);
6565
$1 = (char *) malloc($2+1);
6666
memmove($1,temp,$2);
6767
}

0 commit comments

Comments
 (0)