diff options
author | Olly Betts <olly@survex.com> | 2022-03-14 12:49:41 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2022-03-14 12:49:41 +1300 |
commit | b4a92ae34f6d39825bc0eba056d6983575db4695 (patch) | |
tree | 579ea0dd2c06e8ee8b96563e3e4a7dbf6062b8f8 | |
parent | 598736a6b210cab57afc01c2a26197d675f1f43e (diff) | |
download | swig-b4a92ae34f6d39825bc0eba056d6983575db4695.tar.gz |
Fix SWIG_Py*Method_New conditional
This should be a SWIG-time conditional, but was inside %{ %} so was
instead a compile-time conditional.
Fix for bug in the changes in #2191
-rw-r--r-- | Lib/python/pyinit.swg | 20 |
1 files changed, 18 insertions, 2 deletions
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 * -----------------------------------------------------------------------------*/ |