diff --git a/SWIG/Lib/typemaps/swigobject.swg b/SWIG/Lib/typemaps/swigobject.swg index b75233d31..b5003d2e2 100644 --- a/SWIG/Lib/typemaps/swigobject.swg +++ b/SWIG/Lib/typemaps/swigobject.swg @@ -5,7 +5,12 @@ %typemap(in) SWIG_Object "$1 = $input;"; %typemap(freearg) SWIG_Object ""; -%typemap(in) SWIG_Object const & "$1 = &$input;"; +%typemap(in,noblock=1) SWIG_Object const & ($*ltype temp) +{ + temp = %static_cast($input, $*ltype); + $1 = &temp; +} + %typemap(freearg) SWIG_Object const & "";