-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
While in Python 2.7, it was recommended to explicitly check for errors, and only do the save exception/restore exception dance, modern Python documentation says to always do this, unconditionally. For example, in https://docs.python.org/3.11/extending/newtypes.html#finalization-and-de-allocation. So let's switch to this, and to the more proper deallocation using the tp_free member - not because these are subclassable types, but because the initialisation is also done using tp_alloc, so consistency++.
- Loading branch information
Showing
1 changed file
with
9 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters