SWIGTYPE & varin typemap fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4293 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
07910e94b6
commit
079829c86a
1 changed files with 8 additions and 3 deletions
|
|
@ -266,9 +266,14 @@
|
||||||
/* Typemaps for pointers. Note: the SWIG run-time type checker works
|
/* Typemaps for pointers. Note: the SWIG run-time type checker works
|
||||||
even if a pointer happens to be mapped to a Ruby class */
|
even if a pointer happens to be mapped to a Ruby class */
|
||||||
|
|
||||||
%typemap(varin) SWIGTYPE *,
|
%typemap(varin) SWIGTYPE *
|
||||||
SWIGTYPE &
|
"SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor, 1);"
|
||||||
"SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor, 1);"
|
|
||||||
|
%typemap(varin) SWIGTYPE & {
|
||||||
|
void *temp;
|
||||||
|
SWIG_ConvertPtr($input, (void **) &temp, $1_descriptor, 1);
|
||||||
|
$1 = *($1_ltype) temp;
|
||||||
|
}
|
||||||
|
|
||||||
%typemap(varin) SWIGTYPE [] {
|
%typemap(varin) SWIGTYPE [] {
|
||||||
rb_raise(rb_eRuntimeError, "Array $name is readonly");
|
rb_raise(rb_eRuntimeError, "Array $name is readonly");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue