mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-105268: Remove _PyGC_FINALIZED() macro (#105350)
Remove the old private, undocumented and untested _PyGC_FINALIZED() macro which was kept for backward compatibility with Python 3.8 and older.
This commit is contained in:
parent
49fe2e4af7
commit
8ddf0dd264
3 changed files with 10 additions and 8 deletions
|
@ -489,3 +489,10 @@ Removed
|
||||||
* or :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`.
|
* or :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release`.
|
||||||
|
|
||||||
(Contributed by Victor Stinner in :gh:`105182`.)
|
(Contributed by Victor Stinner in :gh:`105182`.)
|
||||||
|
|
||||||
|
* Remove the old private, undocumented and untested ``_PyGC_FINALIZED()`` macro
|
||||||
|
which was kept for backward compatibility with Python 3.8 and older: use
|
||||||
|
:c:func:`PyObject_GC_IsFinalized()` instead. The `pythoncapi-compat project
|
||||||
|
<https://github.com/python/pythoncapi-compat/>`_ can be used to get this
|
||||||
|
function on Python 3.8 and older.
|
||||||
|
(Contributed by Victor Stinner in :gh:`105268`.)
|
||||||
|
|
|
@ -78,14 +78,6 @@ PyAPI_FUNC(void) PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator);
|
||||||
PyAPI_FUNC(int) PyObject_IS_GC(PyObject *obj);
|
PyAPI_FUNC(int) PyObject_IS_GC(PyObject *obj);
|
||||||
|
|
||||||
|
|
||||||
/* Code built with Py_BUILD_CORE must include pycore_gc.h instead which
|
|
||||||
defines a different _PyGC_FINALIZED() macro. */
|
|
||||||
#ifndef Py_BUILD_CORE
|
|
||||||
// Kept for backward compatibility with Python 3.8
|
|
||||||
# define _PyGC_FINALIZED(o) PyObject_GC_IsFinalized(o)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
// Test if a type supports weak references
|
// Test if a type supports weak references
|
||||||
PyAPI_FUNC(int) PyType_SUPPORTS_WEAKREFS(PyTypeObject *type);
|
PyAPI_FUNC(int) PyType_SUPPORTS_WEAKREFS(PyTypeObject *type);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
Remove the old private, undocumented and untested ``_PyGC_FINALIZED()`` macro
|
||||||
|
which was kept for backward compatibility with Python 3.8 and older. Patch by
|
||||||
|
Victor Stinner.
|
Loading…
Add table
Add a link
Reference in a new issue