From ee8bc64a74e104f09498be189da1f35c4a5ed245 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 10 Jan 2006 23:22:34 +0000 Subject: [PATCH] Fix so that C++ code is not generated for C wrappers git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8361 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyrun.swg | 3 ++- Lib/typemaps/valtypes.swg | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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); }