diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2012-08-26 00:54:01 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2012-08-26 00:54:01 +0200 |
commit | 1bb2ba41f1f00ac5d27895e2f21c674c76339065 (patch) | |
tree | 303528b065ce17049a0a1b81af968caf4e693b67 /Cython/Utility/ModuleSetupCode.c | |
parent | 8f0a8bf5c3210847999897117c98189366dfd7db (diff) | |
download | cython-1bb2ba41f1f00ac5d27895e2f21c674c76339065.tar.gz |
work around 'unused function __Pyx_ImportModule()' compiler warning
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index bb3516389..65d4fc993 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -478,8 +478,8 @@ end: /////////////// RegisterModuleCleanup.proto /////////////// //@substitute: naming -#if PY_MAJOR_VERSION < 3 static int __Pyx_RegisterCleanup(void); /*proto*/ +#if PY_MAJOR_VERSION < 3 static PyObject* ${cleanup_cname}(PyObject *self, PyObject *unused); /*proto*/ #endif @@ -552,4 +552,10 @@ bad: Py_XDECREF(res); return ret; } +#else +// fake call purely to work around "unused function" warning for __Pyx_ImportModule() +static int __Pyx_RegisterCleanup(void) { + if (0) __Pyx_ImportModule(NULL); + return 0; +} #endif |