mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
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:
parent
b1ca34d4d5
commit
fdd878650d
17 changed files with 146 additions and 135 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue