Skip to content

Commit

Permalink
Compile fixes for ruby-1.9.x
Browse files Browse the repository at this point in the history
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11863 626c5289-ae23-0410-ae9c-e8d60b6d4f22
  • Loading branch information
wsfulton committed Feb 13, 2010
1 parent 830de4d commit d64d31a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Examples/ruby/multimap/example.i
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern int gcd(int x, int y);
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");
}
Expand All @@ -47,7 +47,7 @@ extern int gcdmain(int argc, char *argv[]);
SWIG_exception(SWIG_ValueError, "Expected a string");
}
$1 = STR2CSTR($input);
$2 = RSTRING($input)->len;
$2 = RSTRING_LEN($input);
}

extern int count(char *bytes, int len, char c);
Expand All @@ -61,7 +61,7 @@ extern int count(char *bytes, int len, char c);
SWIG_exception(SWIG_ValueError,"Expected a string");
}
temp = STR2CSTR($input);
$2 = RSTRING($input)->len;
$2 = RSTRING_LEN($input);
$1 = (char *) malloc($2+1);
memmove($1,temp,$2);
}
Expand Down

0 comments on commit d64d31a

Please sign in to comment.