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

Until now, we haven't been initializing nor finalizing the per-interpreter state properly.
This commit is contained in:
Eric Snow 2023-05-01 19:36:00 -06:00 committed by GitHub
parent b1ca34d4d5
commit fdd878650d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 146 additions and 135 deletions

View file

@ -16,18 +16,22 @@ PyAPI_FUNC(PyTypeObject *) _PyStructSequence_NewType(
unsigned long tp_flags);
extern int _PyStructSequence_InitBuiltinWithFlags(
PyInterpreterState *interp,
PyTypeObject *type,
PyStructSequence_Desc *desc,
unsigned long tp_flags);
static inline int
_PyStructSequence_InitBuiltin(PyTypeObject *type,
_PyStructSequence_InitBuiltin(PyInterpreterState *interp,
PyTypeObject *type,
PyStructSequence_Desc *desc)
{
return _PyStructSequence_InitBuiltinWithFlags(type, desc, 0);
return _PyStructSequence_InitBuiltinWithFlags(interp, type, desc, 0);
}
extern void _PyStructSequence_FiniBuiltin(PyTypeObject *type);
extern void _PyStructSequence_FiniBuiltin(
PyInterpreterState *interp,
PyTypeObject *type);
#ifdef __cplusplus
}