Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-40241: Add pycore_gc.h header file #19494

Merged
merged 1 commit into from Apr 13, 2020
Merged

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Apr 13, 2020

Move the PyGC_Head structure and the following private macros to the
internal C API:

  • _PyGCHead_FINALIZED()
  • _PyGCHead_NEXT()
  • _PyGCHead_PREV()
  • _PyGCHead_SET_FINALIZED()
  • _PyGCHead_SET_NEXT()
  • _PyGCHead_SET_PREV()
  • _PyGC_FINALIZED()
  • _PyGC_PREV_MASK
  • _PyGC_PREV_MASK_COLLECTING
  • _PyGC_PREV_MASK_FINALIZED
  • _PyGC_PREV_SHIFT
  • _PyGC_SET_FINALIZED()
  • _PyObject_GC_IS_TRACKED()
  • _PyObject_GC_MAY_BE_TRACKED()
  • _Py_AS_GC(o)

Keep the private _PyGC_FINALIZED() macro in the public C API for
backward compatibility with Python 3.8: make it an alias to the new
PyObject_GC_IsFinalized() function.

Move the SIZEOF_PYGC_HEAD constant from _testcapi module to
_testinternalcapi module.

https://bugs.python.org/issue40241

Move the PyGC_Head structure and the following private macros to the
internal C API:

* _PyGCHead_FINALIZED()
* _PyGCHead_NEXT()
* _PyGCHead_PREV()
* _PyGCHead_SET_FINALIZED()
* _PyGCHead_SET_NEXT()
* _PyGCHead_SET_PREV()
* _PyGC_FINALIZED()
* _PyGC_PREV_MASK
* _PyGC_PREV_MASK_COLLECTING
* _PyGC_PREV_MASK_FINALIZED
* _PyGC_PREV_SHIFT
* _PyGC_SET_FINALIZED()
* _PyObject_GC_IS_TRACKED()
* _PyObject_GC_MAY_BE_TRACKED()
* _Py_AS_GC(o)

Keep the private _PyGC_FINALIZED() macro in the public C API for
backward compatibility with Python 3.8: make it an alias to the new
PyObject_GC_IsFinalized() function.

Move the SIZEOF_PYGC_HEAD constant from _testcapi module to
_testinternalcapi module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants