mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-10 11:50:29 +00:00
make test_atexit pass in MODE=
This commit is contained in:
parent
49074cfdbf
commit
318e32cbc0
1 changed files with 4 additions and 1 deletions
5
third_party/python/Python/import.c
vendored
5
third_party/python/Python/import.c
vendored
|
@ -2816,7 +2816,10 @@ PyInit_imp(void)
|
||||||
goto failure;
|
goto failure;
|
||||||
if (PyModule_AddObject(m, "CosmoImporter", (PyObject*)&CosmoImporterType) < 0)
|
if (PyModule_AddObject(m, "CosmoImporter", (PyObject*)&CosmoImporterType) < 0)
|
||||||
goto failure;
|
goto failure;
|
||||||
|
/* test_atexit segfaults without the below incref, but
|
||||||
|
* I'm not supposed to Py_INCREF a static PyTypeObject, so
|
||||||
|
* what's going on? */
|
||||||
|
Py_INCREF(&CosmoImporterType);
|
||||||
return m;
|
return m;
|
||||||
failure:
|
failure:
|
||||||
Py_XDECREF(m);
|
Py_XDECREF(m);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue