diff --git a/Lib/swig.swg b/Lib/swig.swg index 2d21bbb5b..ea73a71a4 100644 --- a/Lib/swig.swg +++ b/Lib/swig.swg @@ -566,6 +566,9 @@ namespace std { %define SWIG_TYPECHECK_CHAR_PTR 2130 %enddef +%define SWIG_TYPECHECK_SWIGOBJECT 5000 %enddef + + /* ----------------------------------------------------------------------------- * Runtime code * ----------------------------------------------------------------------------- */ diff --git a/Lib/typemaps/swigobject.swg b/Lib/typemaps/swigobject.swg index ab91731ba..e89b63026 100644 --- a/Lib/typemaps/swigobject.swg +++ b/Lib/typemaps/swigobject.swg @@ -18,7 +18,7 @@ %set_output(*$1); } -%typecheck(SWIG_TYPECHECK_POINTER) SWIG_Object "$1 = ($input != 0);"; +%typecheck(SWIG_TYPECHECK_SWIGOBJECT) SWIG_Object "$1 = ($input != 0);"; %typemap(throws,noblock=1) SWIG_Object { %raise($1, "$type", 0);