Commit 30256a7e authored by Lisandro Dalcin's avatar Lisandro Dalcin

PyPy3: Register module cleanup with atexit (PyModuleDef.m_free is not used)

parent 99da4323
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment