add %typemap(varin) SWIGTYPE[], fix some typemaps to be safe for %apply

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6423 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-18 00:38:44 +00:00
commit aa85fa1a1e
5 changed files with 27 additions and 12 deletions

View file

@ -64,6 +64,10 @@
for (ii = 0; ii < $1_size; ii++) b[ii] = *(($1_basetype *) temp + ii);
}
%typemap(varin,warning="462: Unable to set dimensionless array variable") SWIGTYPE [] {
rb_raise(rb_eTypeError, "C/C++ variable '$name' is readonly");
}
/* Typemaps for pointers. Note: the SWIG run-time type checker works
even if a pointer happens to be mapped to a Ruby class */