SWIGTYPE & varin typemap fix

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4293 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2003-02-11 21:24:40 +00:00
commit 1538bc2831

View file

@ -266,9 +266,14 @@
/* Typemaps for pointers. Note: the SWIG run-time type checker works
even if a pointer happens to be mapped to a Ruby class */
%typemap(varin) SWIGTYPE *,
SWIGTYPE &
"SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor, 1);"
%typemap(varin) SWIGTYPE *
"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 [] {
rb_raise(rb_eRuntimeError, "Array $name is readonly");