diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 773862695..4443e64aa 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -1078,7 +1078,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) } # endif return NULL; -#endif +#else obj = 0; @@ -1121,6 +1121,7 @@ SWIG_Python_GetSwigThis(PyObject *pyobj) return SWIG_Python_GetSwigThis(obj); } return (SwigPyObject *)obj; +#endif } /* Acquire a pointer value */ diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx index 474f1d835..159773ce0 100644 --- a/Source/Modules/python.cxx +++ b/Source/Modules/python.cxx @@ -3241,7 +3241,7 @@ public: // have a private/protected destructor has an implicit public destructor. String *tp_dealloc = Getattr(n, "feature:python:tp_dealloc"); if (tp_dealloc) { - Printf(f, "SWIGPY_DESTRUCTOR_CLOSURE(%s);\n", tp_dealloc); + Printf(f, "SWIGPY_DESTRUCTOR_CLOSURE(%s)\n", tp_dealloc); tp_dealloc = NewStringf("%s_closure", tp_dealloc); } else { tp_dealloc = NewString("SwigPyBuiltin_BadDealloc");