STINNER Victor <vstin...@python.org> added the comment:
This issue comes from a thread on python-ideas: https://mail.python.org/archives/list/python-id...@python.org/thread/7FC2NHAOMKBHONFTUKMAHO5F56UU5UUD/ I understand that it's specific to Python 2.7. -- _PyGC_generation0 variable no longer exists in Python 3.7, it has been moved into _PyRuntime.gc.generation0: Include/internal/mem.h:146:#define _PyGC_generation0 _PyRuntime.gc.generation0 In the master branch, _PyRuntime is exported with: Include/internal/pycore_pystate.h: PyAPI_DATA(_PyRuntimeState) _PyRuntime; In Python 3.7, _PyRuntime is also exported, but in a different header file: Include/internal/pystate.h: PyAPI_DATA(_PyRuntimeState) _PyRuntime; -- Python 2.7: Modules/gcmodule.c:50:PyGC_Head *_PyGC_generation0 = GEN_HEAD(0); Include/objimpl.h:276:extern PyGC_Head *_PyGC_generation0; ---------- nosy: +vstinner title: Expose _PyGC_generation0 for allowing internal use directly from a CPython extension -> [2.7] Expose _PyGC_generation0 for allowing internal use directly from a CPython extension versions: +Python 2.7 -Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38542> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com