diff --git a/Lib/python/pyinit.swg b/Lib/python/pyinit.swg index 53ee5a318..6833b455a 100644 --- a/Lib/python/pyinit.swg +++ b/Lib/python/pyinit.swg @@ -107,8 +107,20 @@ SWIG_Python_FixMethods(PyMethodDef *methods, const swig_const_info *const_table, } } +#ifdef __cplusplus +} +#endif + +%} + #if defined SWIGPYTHON_FASTPROXY && !defined SWIGPYTHON_BUILTIN +%init %{ + +#ifdef __cplusplus +extern "C" { +#endif + /* ----------------------------------------------------------------------------- * Method creation and docstring support functions * ----------------------------------------------------------------------------- */ @@ -167,12 +179,16 @@ SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyO return PyStaticMethod_New(func); } -#endif - #ifdef __cplusplus } #endif +%} + +#endif + +%init %{ + /* -----------------------------------------------------------------------------* * Partial Init method * -----------------------------------------------------------------------------*/