diff options
Diffstat (limited to 'Lib/typemaps/swigtype.swg')
-rw-r--r-- | Lib/typemaps/swigtype.swg | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/typemaps/swigtype.swg b/Lib/typemaps/swigtype.swg index e8124df9c..d3633eb49 100644 --- a/Lib/typemaps/swigtype.swg +++ b/Lib/typemaps/swigtype.swg @@ -415,7 +415,7 @@ } %typemap(directorin,noblock=1) SWIGTYPE { - $input = SWIG_NewPointerObj(%as_voidptr(&$1), $&descriptor, %newpointer_flags); + $input = SWIG_NewPointerObj(%as_voidptr(new $1_ltype((const $1_ltype &)$1)), $&descriptor, SWIG_POINTER_OWN | %newpointer_flags); } %typemap(directorin,noblock=1) SWIGTYPE & { @@ -625,6 +625,7 @@ %typemap(constcode, noblock=1) SWIGTYPE ((*)(ANY)){ %set_constant("$symname", SWIG_NewFunctionPtrObj((void *)$value, $descriptor)); } +%typemap(constcode) SWIGTYPE ((* const)(ANY)) = SWIGTYPE ((*)(ANY)); #if defined(SWIG_DIRECTOR_TYPEMAPS) |