8000 gh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter by ericsnowcurrently · Pull Request #104072 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-94673: Properly Initialize and Finalize Static Builtin Types for Each Interpreter #104072

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix non-debug builds.
  • Loading branch information
ericsnowcurrently committed May 2, 2023
commit 68331c45fc5b947961088509b0b7de0dcb068e85
4 changes: 2 additions & 2 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,11 @@ static inline PyTypeObject * subclass_from_ref(PyObject *ref);

/* helpers for for static builtin types */

#ifndef NDEBUG
static inline int
static_builtin_index_is_set(PyTypeObject *self)
{
return self->tp_subclasses != NULL;
}
#endif

static inline size_t
static_builtin_index_get(PyTypeObject *self)
Expand Down Expand Up @@ -7046,7 +7044,9 @@ _PyStaticType_InitBuiltin(PyInterpreterState *interp, PyTypeObject *self)
assert(!(self->tp_flags & Py_TPFLAGS_MANAGED_DICT));
assert(!(self->tp_flags & Py_TPFLAGS_MANAGED_WEAKREF));

#ifndef NDEBUG
int ismain = _Py_IsMainInterpreter(interp);
#endif
if (self->tp_flags & Py_TPFLAGS_READY) {
assert(!ismain);
assert(self->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN);
Expand Down
0