Skip to content

bpo-39543: Remove unused _Py_Dealloc() macro#18361

Merged
vstinner merged 1 commit into
python:masterfrom
vstinner:remove_dealloc_macro
Feb 5, 2020
Merged

bpo-39543: Remove unused _Py_Dealloc() macro#18361
vstinner merged 1 commit into
python:masterfrom
vstinner:remove_dealloc_macro

Conversation

@vstinner

@vstinner vstinner commented Feb 5, 2020

Copy link
Copy Markdown
Member

The macro was defined after Py_DECREF() and so is no longer used by
Py_DECREF().

Moving _Py_Dealloc() macro back from cpython/object.h to object.h
would require to move a lot of definitions as well: PyTypeObject and
many related types used by PyTypeObject.

Keep _Py_Dealloc() as an opaque function call to avoid leaking
implementation details in the limited C API (object.h).

https://bugs.python.org/issue39543

The macro was defined after Py_DECREF() and so is no longer used by
Py_DECREF().

Moving _Py_Dealloc() macro back from cpython/object.h to object.h
would require to move a lot of definitions as well: PyTypeObject and
many related types used by PyTypeObject.

Keep _Py_Dealloc() as an opaque function call to avoid leaking
implementation details in the limited C API (object.h).
@vstinner
vstinner merged commit f16433a into python:master Feb 5, 2020
@vstinner
vstinner deleted the remove_dealloc_macro branch February 5, 2020 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants