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
This commit is contained in:
parent
598736a6b2
commit
b4a92ae34f
1 changed files with 18 additions and 2 deletions
|
|
@ -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
|
#if defined SWIGPYTHON_FASTPROXY && !defined SWIGPYTHON_BUILTIN
|
||||||
|
|
||||||
|
%init %{
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Method creation and docstring support functions
|
* Method creation and docstring support functions
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
@ -167,12 +179,16 @@ SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyO
|
||||||
return PyStaticMethod_New(func);
|
return PyStaticMethod_New(func);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
%init %{
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------*
|
/* -----------------------------------------------------------------------------*
|
||||||
* Partial Init method
|
* Partial Init method
|
||||||
* -----------------------------------------------------------------------------*/
|
* -----------------------------------------------------------------------------*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue