Re-organise Python method creation and docstring functions declarations

Fix ‘PyMethodDef* SWIG_PythonGetProxyDoc(const char*)’ declared ‘static’ but
never defined [-Wunused-function]

Closes #1448 (again)
This commit is contained in:
William S Fulton 2019-02-19 22:54:08 +00:00
commit 32b963ef1c
2 changed files with 16 additions and 6 deletions

View file

@ -8,6 +8,22 @@
%fragment("<stddef.h>"); // For offsetof
#endif
%insert(runtime) %{
#ifdef __cplusplus
extern "C" {
#endif
/* Method creation and docstring support functions */
SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
#ifdef __cplusplus
}
#endif
%}
%init %{
#ifdef __cplusplus

View file

@ -213,12 +213,6 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
extern "C" {
#endif
/* Method creation and docstring support functions */
SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
/* The python void return value */
SWIGRUNTIMEINLINE PyObject *