Skip to content

Conversation

@vstinner
Copy link
Member

@vstinnervstinner 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
MemberAuthor

cc @pitrou@pablogsal

@vstinner
Copy link
MemberAuthor

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
MemberAuthor

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 freeto 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

@vstinner@the-knights-who-say-ni@bedevere-bot