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-39947: Hide implementation detail of trashcan macros #18971

Merged
merged 1 commit into from
Mar 13, 2020
Merged

bpo-39947: Hide implementation detail of trashcan macros #18971

merged 1 commit into from
Mar 13, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Mar 12, 2020

Py_TRASHCAN_BEGIN_CONDITION and Py_TRASHCAN_END macro no longer
access PyThreadState attributes, but call new private
_PyTrash_begin() and _PyTrash_end() functions which hide
implementation details.

Remove also PyTrash_UNWIND_LEVEL from the C API.

https://bugs.python.org/issue39947

@vstinner
Copy link
Member Author

cc @pitrou @pablogsal

@vstinner
Copy link
Member Author

Oh. Once this change will be merged, it becomes possible to expose Py_TRASHCAN_BEGIN_CONDITION and Py_TRASHCAN_END to the limited C API!

Py_TRASHCAN_BEGIN_CONDITION and Py_TRASHCAN_END macro no longer
access PyThreadState attributes, but call new private
_PyTrash_begin() and _PyTrash_end() functions which hide
implementation details.
@vstinner
Copy link
Member Author

vstinner commented Mar 13, 2020

First, I removed PyTrash_UNWIND_LEVEL from the C API. But I changed my mind and kept it, it doesn't arm in any way. There is no need to break the C API for free :-)

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.

3 participants