Support building with recent versions of the Ruby 1.9 development branch.
Fixes bug #1560092. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9333 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8fa318ee36
commit
2f6a268e55
11 changed files with 137 additions and 118 deletions
|
|
@ -25,10 +25,10 @@
|
|||
%typemap(in) (int ARGC, char **ARGV) {
|
||||
if (rb_obj_is_kind_of($input,rb_cArray)) {
|
||||
int i;
|
||||
int size = RARRAY($input)->len;
|
||||
int size = RARRAY_LEN($input);
|
||||
$1 = ($1_ltype) size;
|
||||
$2 = (char **) malloc((size+1)*sizeof(char *));
|
||||
VALUE *ptr = RARRAY($input)->ptr;
|
||||
VALUE *ptr = RARRAY_PTR($input);
|
||||
for (i=0; i < size; i++, ptr++) {
|
||||
$2[i]= STR2CSTR(*ptr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue