Skip to content

gh-94673: Add _PyStaticType_InitBuiltin()#95152

Merged
ericsnowcurrently merged 5 commits into
python:mainfrom
ericsnowcurrently:init-static-builtin-new
Jul 25, 2022
Merged

gh-94673: Add _PyStaticType_InitBuiltin()#95152
ericsnowcurrently merged 5 commits into
python:mainfrom
ericsnowcurrently:init-static-builtin-new

Conversation

@ericsnowcurrently

@ericsnowcurrently ericsnowcurrently commented Jul 22, 2022

Copy link
Copy Markdown
Member

This is the first of several precursors to storing tp_subclasses (and tp_weaklist) on the interpreter state for static builtin types.

We do the following:

  • add _PyStaticType_InitBuiltin()
  • add _Py_TPFLAGS_STATIC_BUILTIN
  • set it on all static builtin types in _PyStaticType_InitBuiltin()
  • shuffle some code around to be able to use _PyStaticType_InitBuiltin()
    • rename _PyStructSequence_InitType() to _PyStructSequence_InitBuiltinWithFlags()
    • add _PyStructSequence_InitBuiltin().

@ericsnowcurrently

Copy link
Copy Markdown
Member Author

This was split out of #94995.

Comment thread Objects/structseq.c
@ericsnowcurrently ericsnowcurrently merged commit 4a1dd73 into python:main Jul 25, 2022
@ericsnowcurrently ericsnowcurrently deleted the init-static-builtin-new branch July 25, 2022 18:47
Sign up for free to 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