Skip to content

Conversation

@corona10
Copy link
Member

@corona10corona10 commented Feb 2, 2024

@corona10corona10 changed the title gh-111968: Refactor _PyXXX_Fini to follow Eric's suggestiongh-111968: Refactor _PyXXX_Fini to use _PyObject_ClearFreeListsFeb 2, 2024
@corona10
Copy link
MemberAuthor

corona10 commented Feb 2, 2024

Addressed by @ericsnowcurrently 's and @colesbury 's review from #111968 (comment)

@corona10corona10 changed the title gh-111968: Refactor _PyXXX_Fini to use _PyObject_ClearFreeListsgh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeListsFeb 2, 2024
Copy link
Contributor

@colesburycolesbury left a 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.

Copy link
Member

@ericsnowcurrentlyericsnowcurrently left a 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.

@bedevere-app
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

And if you don't make the requested changes, you will be put in the comfy chair!

struct _Py_object_stack_state object_stacks;
} _PyFreeListState;

extern void _PyObject_ClearFreeLists(_PyFreeListState *state, int is_finalization);
Copy link
MemberAuthor

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 :)

@corona10corona10 changed the title gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeLists[WIP] gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeListsFeb 3, 2024
@corona10corona10 changed the title [WIP] gh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeListsgh-111968: Refactor _PyXXX_Fini to integrate with _PyObject_ClearFreeListsFeb 3, 2024
@corona10
Copy link
MemberAuthor

I have made the requested changes; please review again

@corona10
Copy link
MemberAuthor

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 bytecodes.c

@corona10
Copy link
MemberAuthor

@ericsnowcurrently gentle ping

Copy link
Member

@ericsnowcurrentlyericsnowcurrently left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@corona10corona10 enabled auto-merge (squash) February 10, 2024 00:42
@corona10corona10 merged commit d4d5bae into python:mainFeb 10, 2024
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull request Feb 14, 2024
@corona10corona10 deleted the gh-111968-fini branch February 15, 2024 01:41
Sign up for freeto 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

@corona10@colesbury@ericsnowcurrently