From 81b3d4433da0bed2e369092031a667440bbec3fe Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 4 Apr 2011 06:38:14 +0000 Subject: [PATCH] Fix warning in wrappers (Python > 3.0) - SF# 3239071 git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12606 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/pyrun.swg | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Lib/python/pyrun.swg b/Lib/python/pyrun.swg index 2e548bad2..f24cfedab 100644 --- a/Lib/python/pyrun.swg +++ b/Lib/python/pyrun.swg @@ -1541,14 +1541,12 @@ SWIG_Python_DestroyModule(void *vptr) SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info *swig_module) { - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ - #if PY_VERSION_HEX >= 0x03000000 /* Add a dummy module object into sys.modules */ PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); #else - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - swig_empty_runtime_method_table); + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); #endif PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); if (pointer && module) {