diff options
author | Lisandro Dalcin <dalcinl@gmail.com> | 2017-10-19 11:43:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-19 11:43:58 +0300 |
commit | 7cd06beaf17e638b442e991e1b20385c224e62ef (patch) | |
tree | 5e51c7ddd3022e3fbde9743f98674113843b3871 | |
parent | 99da4323411cf7a0d83d1dd319c63a65845f8ff7 (diff) | |
parent | 30256a7e8908acb90ecc912e57361c49f1a80e4a (diff) | |
download | cython-7cd06beaf17e638b442e991e1b20385c224e62ef.tar.gz |
Merge pull request #1938 from cython/dalcinl/fix-module-cleanup
PyPy3: Register module cleanup with atexit
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 043cd7206..910d3e942 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -1040,7 +1040,7 @@ static int __Pyx_RegisterCleanup(void); /*proto*/ //@substitute: naming //@requires: ImportExport.c::ModuleImport -#if PY_MAJOR_VERSION < 3 +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY static PyObject* ${cleanup_cname}_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { ${cleanup_cname}(module); Py_INCREF(Py_None); return Py_None; @@ -1113,7 +1113,7 @@ bad: #else // fake call purely to work around "unused function" warning for __Pyx_ImportModule() static int __Pyx_RegisterCleanup(void) { - if ((0)) __Pyx_ImportModule(NULL); + (void)__Pyx_ImportModule; /* unused */ return 0; } #endif |