diff --git a/Lib/chicken/chicken.swg b/Lib/chicken/chicken.swg index 5e2ece120..4e8363372 100644 --- a/Lib/chicken/chicken.swg +++ b/Lib/chicken/chicken.swg @@ -349,10 +349,6 @@ $result = C_SCHEME_UNDEFINED; } #endif -%typemap(varin) SWIGTYPE [] { - swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Variable $name is read-only"); -} - /* Special case for string array variables */ %typemap(varin) char [ANY] { if ($input == C_SCHEME_FALSE) { diff --git a/Lib/perl5/perl5.swg b/Lib/perl5/perl5.swg index c749ecad4..239cb1018 100644 --- a/Lib/perl5/perl5.swg +++ b/Lib/perl5/perl5.swg @@ -226,7 +226,7 @@ %typemap(varin) long long "$1 = ($1_ltype) strtoll(SvPV($input, PL_na), 0, 0);"; %typemap(varin) unsigned long long "$1 = ($1_ltype) strtoull(SvPV($input, PL_na), 0, 0);"; -%typemap(varin) SWIGTYPE *, SWIGTYPE [] { +%typemap(varin) SWIGTYPE * { if (SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor,0) < 0) { croak("Type error in argument $argnum of $symname. Expected $1_mangle"); } @@ -325,8 +325,6 @@ %typemap(varin) char [ANY] "strncpy($1, (char *) SvPV(sv,PL_na), $1_dim0);"; -%typemap(varin) SWIGTYPE [] "croak(\"Value is read-only.\");"; - %typemap(varin) enum SWIGTYPE "$1 = ($1_type) SvIV($input);"; diff --git a/Lib/python/python.swg b/Lib/python/python.swg index 78ee93ff2..10db1b352 100644 --- a/Lib/python/python.swg +++ b/Lib/python/python.swg @@ -295,11 +295,6 @@ } #endif -%typemap(varin) SWIGTYPE [] { - PyErr_SetString(PyExc_TypeError, "Variable $name is read-only."); - return 1; -} - %typemap(varin) SWIGTYPE [ANY] { void *temp; int ii; diff --git a/Lib/ruby/ruby.swg b/Lib/ruby/ruby.swg index ff1d7a3c8..a50879f11 100644 --- a/Lib/ruby/ruby.swg +++ b/Lib/ruby/ruby.swg @@ -275,10 +275,6 @@ $1 = *($1_ltype) temp; } -%typemap(varin) SWIGTYPE [] { - rb_raise(rb_eRuntimeError, "Array $name is readonly"); -} - %typemap(varin) void * "SWIG_ConvertPtr($input, (void **) &$1, 0, 1);"; diff --git a/Lib/tcl/tcl8.swg b/Lib/tcl/tcl8.swg index 6011d74d3..a3ff7d1aa 100644 --- a/Lib/tcl/tcl8.swg +++ b/Lib/tcl/tcl8.swg @@ -386,7 +386,7 @@ $1 = *(($&1_type) temp); } -%typemap(varin) SWIGTYPE [] { +%typemap(varin) SWIGTYPE [ANY] { void *temp; if (SWIG_ConvertPtr(interp,$input,&temp,$1_descriptor, SWIG_POINTER_EXCEPTION) != TCL_OK) { return (char *)"Type error. Expected $1_ltype";