diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index fc2a27e10..19ca3dde8 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -230,8 +230,9 @@ PySwigClientData_New(PyObject* obj) data->destroy = 0; } if (data->destroy) { + int flags; Py_INCREF(data->destroy); - int flags = PyCFunction_GET_FLAGS(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O data->delargs = !(flags & (METH_O)); #else diff --git a/Lib/typemaps/valtypes.swg b/Lib/typemaps/valtypes.swg index bec5af66a..841f1ff9b 100644 --- a/Lib/typemaps/valtypes.swg +++ b/Lib/typemaps/valtypes.swg @@ -160,7 +160,7 @@ /* typecheck */ %define %value_typecheck_typemap(check,asval_meth,frag,Type...) - %typemap(typecheck,noblock=1,precedence=check,fragment=frag) Type, const Type& { + %typemap(typecheck,precedence=check,fragment=frag) Type, const Type& { int res = asval_meth($input, NULL); $1 = SWIG_CheckState(res); }