Added a varin typemap for char[] (Ruby). Fixes broken test case
arrays_global.i. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6098 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9a2d4a6159
commit
3bbf2a57df
1 changed files with 5 additions and 1 deletions
|
|
@ -277,7 +277,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Special case for string array variables */
|
/* Special case for string array variables */
|
||||||
%typemap(varin) char [ANY] "strncpy($1,StringValuePtr($input),$1_dim0);";
|
%typemap(varin) char[] {
|
||||||
|
size_t size = sizeof($1);
|
||||||
|
strncpy($1,StringValuePtr($input),size);
|
||||||
|
}
|
||||||
|
%typemap(varin) char[ANY] "strncpy($1,StringValuePtr($input),$1_dim0);";
|
||||||
|
|
||||||
|
|
||||||
/* Typemaps for pointers. Note: the SWIG run-time type checker works
|
/* Typemaps for pointers. Note: the SWIG run-time type checker works
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue