|
From: SourceForge.net <no...@so...> - 2009-02-28 14:03:02
|
Feature Requests item #2637352, was opened at 2009-02-25 23:30 Message generated for change (Comment added) made by bhy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=351645&aid=2637352&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Priority: 5 Private: No Submitted By: Thierry BERNARD (t_bernard) Assigned to: Nobody/Anonymous (nobody) Summary: pyinit.swg problem with Python3 Initial Comment: In pyinit.swg file SWIG_module structure is declared and initialized after the call of SWIG_Python_FixMethods method. c compiler don't accept this. We have to replace this code with something like this ( structure declared before the call of SWIG_Python_FixMethods method ) : SWIG_init(void) { PyObject *m, *d; #if PY_VERSION_HEX >= 0x03000000 static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, (char *) SWIG_name, NULL, -1, SwigMethods, 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); #else m = Py_InitModule((char *) SWIG_name, SwigMethods); #endif d = PyModule_GetDict(m); SWIG_InitializeModule(0); SWIG_InstallConstants(d,swig_const_table); ---------------------------------------------------------------------- >Comment By: Haoyu Bai (bhy) Date: 2009-02-28 22:02 Message: Fixed in SVN commit 11140. Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=351645&aid=2637352&group_id=1645 |