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
|
|
@ -1,6 +1,11 @@
|
||||||
Version 1.3.39 (in progress)
|
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
|
2008-02-21: wsfulton
|
||||||
[Allegrocl] Fix seg fault wrapping some constant variable (%constant) types.
|
[Allegrocl] Fix seg fault wrapping some constant variable (%constant) types.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -319,9 +319,6 @@ SWIGEXPORT
|
||||||
#endif
|
#endif
|
||||||
SWIG_init(void) {
|
SWIG_init(void) {
|
||||||
PyObject *m, *d;
|
PyObject *m, *d;
|
||||||
|
|
||||||
/* 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
|
#if PY_VERSION_HEX >= 0x03000000
|
||||||
static struct PyModuleDef SWIG_module = {
|
static struct PyModuleDef SWIG_module = {
|
||||||
PyModuleDef_HEAD_INIT,
|
PyModuleDef_HEAD_INIT,
|
||||||
|
|
@ -334,7 +331,12 @@ SWIG_init(void) {
|
||||||
NULL,
|
NULL,
|
||||||
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);
|
m = PyModule_Create(&SWIG_module);
|
||||||
#else
|
#else
|
||||||
m = Py_InitModule((char *) SWIG_name, SwigMethods);
|
m = Py_InitModule((char *) SWIG_name, SwigMethods);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue