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/SWIG@6098 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b4c50d1819
commit
bcfce506d1
1 changed files with 5 additions and 1 deletions
|
|
@ -277,6 +277,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Special case for string array variables */
|
/* Special case for string array variables */
|
||||||
|
%typemap(varin) char[] {
|
||||||
|
size_t size = sizeof($1);
|
||||||
|
strncpy($1,StringValuePtr($input),size);
|
||||||
|
}
|
||||||
%typemap(varin) char[ANY] "strncpy($1,StringValuePtr($input),$1_dim0);";
|
%typemap(varin) char[ANY] "strncpy($1,StringValuePtr($input),$1_dim0);";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue