Fix SF#2637352, move declaration of SWIG_module before the call of SWIG_Python_FixMethods, since some C compiler don't allow declaration in middle of function body.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11140 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fdcea43ba4
commit
c74c467a09
2 changed files with 11 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue