-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeLists #114899
Conversation
Addressed by @ericsnowcurrently 's and @colesbury 's review from #111968 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, although I'd probably name PySlice_ClearCache
like the other freelist clearing functions for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this. It mostly looks okay to me. There are just a few small things I'd like you to consider.
When you're done making the requested changes, leave the comment: And if you don't make the requested changes, you will be put in the comfy chair! |
@@ -125,6 +125,16 @@ typedef struct _Py_freelist_state { | |||
struct _Py_object_stack_state object_stacks; | |||
} _PyFreeListState; | |||
|
|||
extern void _PyObject_ClearFreeLists(_PyFreeListState *state, int is_finalization); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this API is not a domain-specific API, I located all ClearFreeList API into here :)
I have made the requested changes; please review again |
As I commented before, we need some header cleanup, but I will do it as a separate PR since it affected a lot of codes, including |
@ericsnowcurrently gentle ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
--disable-gil
builds #111968