diff --git a/Lib/python/python.swg b/Lib/python/python.swg index 98173fae1..4e3963eec 100644 --- a/Lib/python/python.swg +++ b/Lib/python/python.swg @@ -113,10 +113,11 @@ if (PyErr_Occurred()) SWIG_fail; } -%typemap(in) char [ANY] -{ - SPyObj_AsCharArray($input, $1, $1_dim0); +%typemap(in) char [ANY] (char temp[$1_dim0]) +{ + SPyObj_AsCharArray($input, temp, $1_dim0); if (PyErr_Occurred()) SWIG_fail; + $1 = temp; }