diff --git a/CHANGES.current b/CHANGES.current index 66f3a87b7..bffefbb2b 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,11 @@ Version 1.3.39 (in progress) ============================ +2008-02-28: bhy + [Python] Fix SF#2637352. Move struct declaration of SWIG_module in pyinit.swg before + the method calls, since some C compiler don't allow declaration in middle of function + body. + 2008-02-21: wsfulton [Allegrocl] Fix seg fault wrapping some constant variable (%constant) types. diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg index ab55765ad..5fa50ecb8 100644 --- a/Lib/python/pyinit.swg +++ b/Lib/python/pyinit.swg @@ -318,10 +318,7 @@ SWIGEXPORT void #endif SWIG_init(void) { - PyObject *m, *d; - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + PyObject *m, *d; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, @@ -334,7 +331,12 @@ SWIG_init(void) { NULL, NULL }; +#endif + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + +#if PY_VERSION_HEX >= 0x03000000 m = PyModule_Create(&SWIG_module); #else m = Py_InitModule((char *) SWIG_name, SwigMethods);