diff --git a/Doc/conf.py b/Doc/conf.py index 1666f7b3b435cd..0fb8b5cd800cfb 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -635,6 +635,8 @@ "library/exceptions.rst": "builtins/exceptions.rst", "library/threadsafety.rst": "builtins/threadsafety.rst", "library/time-complexity.rst": "builtins/time-complexity.rst", + # Renamed to tkinter.dialogs.rst in GH-151656 + "library/dialog.rst": "library/tkinter.dialogs.rst", } # Refuse to run the doctest builder under a mismatched Python diff --git a/Doc/tools/removed-ids.txt b/Doc/tools/removed-ids.txt index d3e4d581bbc9e8..be3c2f38f194ec 100644 --- a/Doc/tools/removed-ids.txt +++ b/Doc/tools/removed-ids.txt @@ -83,9 +83,6 @@ reference/expressions.html: generator.close reference/expressions.html: generator.send reference/expressions.html: generator.throw -# Renamed to library/tkinter.dialogs.html -library/dialog.html: (page missing) - # Obsolete sections in 'turtle' docs library/turtle.html: changes-since-python-2-6 library/turtle.html: changes-since-python-3-0 diff --git a/Include/internal/pycore_pystate.h b/Include/internal/pycore_pystate.h index 253d26fe3a3cd8..6caa7a5d30116e 100644 --- a/Include/internal/pycore_pystate.h +++ b/Include/internal/pycore_pystate.h @@ -150,6 +150,23 @@ extern void _PyThreadState_Detach(PyThreadState *tstate); // to the "detached" state. extern void _PyThreadState_Suspend(PyThreadState *tstate); +#ifdef Py_GIL_DISABLED +// Try to atomically transition a *different* thread's state from "detached" +// to "suspended". On success, the target thread cannot attach until +// _PyThreadState_ResumeDetached() is called, and the caller may safely +// perform operations that are normally only permitted for the owning thread +// (such as merging the biased reference counts of objects it owns). +// +// The caller must not run arbitrary Python code, allocate GC objects, or +// stop the world while holding the thread in the suspended state. +// Returns 1 on success, 0 if the thread was not in the "detached" state. +extern int _PyThreadState_TrySuspendDetached(PyThreadState *tstate); + +// Undo a successful _PyThreadState_TrySuspendDetached(): switch the thread +// back to "detached" and wake it if it is waiting to attach. +extern void _PyThreadState_ResumeDetached(PyThreadState *tstate); +#endif + // Mark the thread state as "shutting down". This is used during interpreter // and runtime finalization. The thread may no longer attach to the // interpreter and will instead block via _PyThreadState_HangThread(). diff --git a/Include/internal/pycore_unicodeobject_generated.h b/Include/internal/pycore_unicodeobject_generated.h index b30cfc678de1cd..a9db3b828d1ef8 100644 --- a/Include/internal/pycore_unicodeobject_generated.h +++ b/Include/internal/pycore_unicodeobject_generated.h @@ -11,3527 +11,896 @@ extern "C" { /* The following is auto-generated by Tools/build/generate_global_objects.py. */ static inline void _PyUnicode_InitStaticStrings(PyInterpreterState *interp) { - PyObject *string; - string = &_Py_ID(AGEN_CLOSED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(AGEN_CREATED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(AGEN_RUNNING); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(AGEN_SUSPENDED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(CANCELLED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(CORO_CLOSED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(CORO_CREATED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(CORO_RUNNING); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(CORO_SUSPENDED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(Emax); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(Emin); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(FINISHED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(False); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(GEN_CLOSED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(GEN_CREATED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(GEN_RUNNING); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(GEN_SUSPENDED); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(JSONDecodeError); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(PENDING); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(Py_Repr); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(TextIOWrapper); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(True); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(WarningMessage); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_WindowsConsoleIO); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__IOBase_closed); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__abc_tpflags__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__abs__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__abstractmethods__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__add__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__aenter__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__aexit__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__aiter__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__all__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__and__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__anext__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__annotate__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__annotate_func__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__annotations__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__annotations_cache__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__args__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__await__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__bases__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__bool__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__buffer__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__build_class__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__builtins__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__bytes__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__call__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__cantrace__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ceil__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__class__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__class_getitem__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__classcell__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__classdict__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__classdictcell__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__complex__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__conditional_annotations__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__contains__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ctypes_from_outparam__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__del__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__delattr__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__delete__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__delitem__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__dict__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__dictoffset__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__dir__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__divmod__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__doc__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__enter__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__eq__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__exit__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__file__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__firstlineno__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__float__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__floor__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__floordiv__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__format__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__fspath__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ge__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__get__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__getattr__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__getattribute__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__getinitargs__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__getitem__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__getnewargs__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__getnewargs_ex__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__getstate__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__gt__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__hash__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__iadd__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__iand__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ifloordiv__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ilshift__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__imatmul__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__imod__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__import__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__imul__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__index__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__init__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__init_subclass__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__instancecheck__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__int__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__invert__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ior__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ipow__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__irshift__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__isabstractmethod__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__isub__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__iter__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__itruediv__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ixor__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__lazy_import__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__lazy_modules__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__le__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__len__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__length_hint__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__lltrace__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__loader__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__lshift__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__lt__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__main__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__match_args__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__matmul__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__missing__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__mod__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__module__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__mro_entries__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__mul__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__name__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ne__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__neg__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__new__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__newobj__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__newobj_ex__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__next__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__notes__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__or__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__orig_class__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__origin__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__package__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__parameters__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__path__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__pos__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__pow__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__prepare__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__qualname__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__radd__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rand__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rdivmod__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__reduce__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__reduce_ex__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__release_buffer__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__repr__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__reversed__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rfloordiv__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rlshift__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rmatmul__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rmod__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rmul__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__ror__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__round__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rpow__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rrshift__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rshift__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rsub__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rtruediv__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__rxor__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__set__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__set_name__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__setattr__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__setitem__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__setstate__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__sizeof__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__slotnames__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__slots__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__spec__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__static_attributes__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__str__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__sub__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__subclasscheck__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__subclasshook__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__truediv__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__trunc__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__type_params__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__typing_is_unpacked_typevartuple__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__typing_prepare_subst__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__typing_subst__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__typing_unpacked_tuple_args__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__warningregistry__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__weaklistoffset__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__weakref__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(__xor__); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_abc_impl); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_abstract_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_active); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_anonymous_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_argtypes_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_as_parameter_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_asyncio_future_blocking); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_blksize); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_bootstrap); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_check_retval_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_dealloc_warn); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_feature_version); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_field_types); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_fields_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_filters); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_finalizing); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_find_and_load); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_find_and_load_lazy_submodule); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_fix_up_module); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_flags_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_get_sourcefile); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_handle_fromlist); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_initializing); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_internal_use); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_io); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_is_text_encoding); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_isatty_open_only); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_length_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_limbo); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_lock_unlock_module); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_loop); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_needs_com_addref_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_only_immortal); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_restype_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_showwarnmsg); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_shutdown); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_slotnames); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_strptime); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_strptime_datetime_date); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_strptime_datetime_datetime); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_strptime_datetime_time); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_type_); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_uninitialized_submodules); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_warn_unawaited_coroutine); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(_xoptions); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(abs_tol); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(access); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(aclose); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(add); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(add_done_callback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(adobe); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(after_in_child); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(after_in_parent); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(alias); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(align); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(all); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(all_interpreters); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(all_threads); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(allow_code); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(alphabet); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(any); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(append); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(arg); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(argdefs); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(args); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(arguments); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(argv); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(as_integer_ratio); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(asend); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(assoclen); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ast); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(athrow); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(attr); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(attribute); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(autocommit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(backtick); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(base); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(before); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(big); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(binary_form); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(bit_offset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(bit_size); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(block); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(blocking); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(bound); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(buffer); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(buffer_callback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(buffer_size); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(buffering); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(buffers); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(bufsize); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(builtins); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(byte_offset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(byte_size); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(byteorder); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(bytes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(bytes_per_sep); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(c_call); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(c_exception); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(c_parameter_type); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(c_return); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(c_stack); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cache_frames); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cached_datetime_module); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cached_statements); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cadata); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cafile); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(call); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(call_exception_handler); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(call_soon); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(callable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(callback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cancel); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(canonical); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(capath); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(capitals); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(category); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cb_type); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(certfile); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(chain); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(check_same_thread); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(clamp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(clear); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(close); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(closed); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(closefd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(closure); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_argcount); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_cellvars); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_code); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_consts); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_exceptiontable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_filename); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_firstlineno); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_flags); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_freevars); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_kwonlyargcount); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_linetable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_name); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_names); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_nlocals); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_posonlyargcount); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_qualname); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_stacksize); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(co_varnames); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(code); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(col_offset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(collector); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(command); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(comment_factory); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(compile_mode); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(compression); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(config); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(consts); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(context); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(contravariant); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(conversion); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cookie); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(copy); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(copyreg); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(coro); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(count); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(covariant); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ctx); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(cwd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(d_parameter_type); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(data); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(database); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(date); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(day); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(days); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(debug); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(decode); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(decoder); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(default); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(defaultaction); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(delete); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(depth); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(desired_access); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(detect_types); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(deterministic); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(device); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(dict); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(difference_update); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(digest); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(digest_size); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(digestmod); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(dir_fd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(discard); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(dispatch_table); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(displayhook); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(dklen); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(doc); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(done); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(dont_inherit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(dst); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(dst_dir_fd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(duration_sec); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(eager_start); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(effective_ids); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(element_factory); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(emptyerror); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(encode); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(encoding); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(end); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(end_col_offset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(end_lineno); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(end_offset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(endpos); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(entrypoint); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(env); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(error_rate); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(errors); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(event); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(eventmask); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exc); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exc_tb); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exc_type); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exc_val); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exc_value); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(excepthook); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exception); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(existing_file_name); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(exp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(expression); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(extend); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(extra_tokens); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(facility); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(factory); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fallback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(false); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(family); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fanout); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fd2); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fdel); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fget); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fields); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(file); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(file_actions); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(filename); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fileno); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(filepath); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fillvalue); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(filter); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(filters); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(final); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(find_class); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fix_imports); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(flags); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(flush); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fold); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(foldspaces); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(follow_symlinks); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(format); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(format_spec); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(frame_buffer); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(free_threaded); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(from_param); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fromlist); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fromtimestamp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fromutc); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(fullerror); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(func); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(future); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(gc); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(generation); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(get); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(get_debug); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(get_loop); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(get_source); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(getattr); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(getstate); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(gid); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(globals); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(groupindex); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(groups); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(handle); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(handle_seq); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(has_location); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(hash_name); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(header); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(headers); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(hi); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(hook); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(host); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(hour); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(hours); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(id); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ident); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(identity_hint); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ignore); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ignorechars); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(imag); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(implieslink); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(importlib); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(in_fd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(include_aliases); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(incoming); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(index); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(indexgroup); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(inf); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(infer_variance); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(inherit_handle); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(inheritable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(initial); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(initial_bytes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(initial_owner); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(initial_state); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(initial_value); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(initval); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(inner_size); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(input); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(insert_comments); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(insert_pis); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(instructions); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(intern); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(intersection); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(interval); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(io); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(is_compress); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(is_raw); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(is_running); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(is_struct); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(isatty); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(isinstance); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(isoformat); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(isolation_level); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(istext); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(item); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(items); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(iter); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(iterable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(iterations); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(iv); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(join); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(jump); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(keepends); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(key); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(keyfile); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(keys); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(kind); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(kw); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(kw1); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(kw2); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(kwargs); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(kwdefaults); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(label); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(last); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(last_exc); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(last_node); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(last_traceback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(last_type); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(last_value); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(latin1); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(leaf_size); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(legacy); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(len); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(length); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(level); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(limit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(line); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(line_buffering); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(lineno); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(little); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(lo); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(locale); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(locals); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(logoption); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(loop); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(manual_reset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(mapping); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(mask); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(match); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(max_length); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(max_threads); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(maxdigits); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(maxevents); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(maxlen); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(maxmem); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(maxsize); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(maxsplit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(maxvalue); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(memLevel); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(memlimit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(message); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(metaclass); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(metadata); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(method); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(microsecond); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(microseconds); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(milliseconds); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(minute); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(minutes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(missed_samples); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(mod); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(mode); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(module); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(module_globals); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(modules); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(modulo); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(month); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(mro); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(msg); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(mutex); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(mycmp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(n_fields); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(n_sequence_fields); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(n_unnamed_fields); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(name); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(name_from); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(namespace_separator); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(namespaces); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(native); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(nbytes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ndigits); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(nested); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(new_file_name); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(new_limit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(newline); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(newlines); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(next); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(nlocals); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(node_depth); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(node_offset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ns); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(nstype); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(nt); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(null); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(number); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(obj); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(object); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(offset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(offset_dst); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(offset_src); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(on_type_read); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(onceregistry); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(only_active_thread); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(only_keys); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(op); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(oparg); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(opcode); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(opcodes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(open); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(opener); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(operation); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(optimize); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(options); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(order); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(origin); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(other); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(out_fd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(outgoing); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(outpath); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(overlapped); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(owner); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pad); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(padded); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pages); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pair); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(parameter); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(parent); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(password); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(path); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pattern); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(peek); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(persistent_id); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(persistent_load); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(person); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pi_factory); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pid); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pidfd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pointer_bits); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(policy); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(port); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pos); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pos1); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(pos2); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(posix); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(prec); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(preserve_exc); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(print_file_and_line); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(priority); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(progress); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(progress_callback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(progress_routine); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(proto); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(protocol); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ps1); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(ps2); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(qid); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(qualname); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(query); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(queuetype); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(quotetabs); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(raw); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(read); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(read1); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(readable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(readall); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(readinto); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(readinto1); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(readline); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(readonly); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(real); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(recursive); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(reducer_override); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(registry); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(rel_tol); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(release); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(reload); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(repeat); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(repl); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(replace); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(repr); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(reqrefs); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(require_ready); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(reserved); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(reset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(resetids); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(restrict); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(return); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(reverse); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(reversed); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(rounding); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(salt); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sample_interval_us); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sample_rate); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sched_priority); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(scheduler); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(script); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(second); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(seconds); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(security_attributes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(seek); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(seekable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(selectors); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(self); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(send); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sep); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sequence); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(server_hostname); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(server_side); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(session); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(setpgroup); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(setsid); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(setsigdef); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(setsigmask); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(setstate); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(shape); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(shared); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(short); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(show_cmd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(signed); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(signum); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(size); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sizehint); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(skip_file_prefixes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(skip_non_matching_threads); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sleep); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sock); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sort); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(source); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(source_traceback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(spam); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(src); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(src_dir_fd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stack_frames); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stacklevel); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(start); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(start_time_us); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(statement); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stats); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(status); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stderr); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stdin); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stdout); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(step); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(steps); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stop_exception); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(stop_value); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(store_name); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(strategy); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(strftime); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(strict); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(strict_mode); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(string); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(sub_key); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(subcalls); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(symmetric_difference_update); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tabsize); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tag); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(take_bytes); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(target); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(target_is_directory); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(targetfd); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(task); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tb_frame); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tb_lasti); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tb_lineno); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tb_next); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tell); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(template); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(term); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(text); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(third); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(threading); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(throw); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(time); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(timeout); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(timer); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(times); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(timespec); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(timestamp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(timestamp_us); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(timetuple); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(timeunit); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(top); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(traceback); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(trailers); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(translate); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(traps); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(true); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(truncate); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(twice); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(txt); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(type); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(type_params); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tz); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tzinfo); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(tzname); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(uid); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(unboundop); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(unlink); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(unraisablehook); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(updates); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(uri); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(usedforsecurity); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(utcoffset); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(value); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(values); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(version); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(volume); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(wait_all); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(warn_on_full_buffer); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(warnings); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(warnoptions); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(wbits); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(week); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(weekday); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(weeks); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(which); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(who); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(withdata); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(wrapcol); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(writable); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(write); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(write_through); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(year); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(zdict); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_ID(zstd_dict); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(empty); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(dbl_percent); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(dot_locals); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(defaults); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(format); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(generic_base); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(kwdefaults); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(type_params); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(str_replace_inf); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(gc); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_null); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_dictcomp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_genexpr); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_lambda); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_listcomp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_module); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(native); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_setcomp); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_string); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(anon_unknown); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(json_decoder); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(list_err); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(utf_8); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(dbl_open_br); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); - string = &_Py_STR(dbl_close_br); - _PyUnicode_InternStatic(interp, &string); - assert(_PyUnicode_CheckConsistency(string, 1)); - assert(PyUnicode_GET_LENGTH(string) != 1); + // Offsets avoid a pointer relocation for each string. + static const uint32_t offsets[] = { + offsetof(struct _Py_global_strings, identifiers._py_AGEN_CLOSED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_AGEN_CREATED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_AGEN_RUNNING._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_AGEN_SUSPENDED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_CANCELLED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_CORO_CLOSED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_CORO_CREATED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_CORO_RUNNING._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_CORO_SUSPENDED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_Emax._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_Emin._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_FINISHED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_False._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_GEN_CLOSED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_GEN_CREATED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_GEN_RUNNING._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_GEN_SUSPENDED._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_JSONDecodeError._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_PENDING._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_Py_Repr._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_TextIOWrapper._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_True._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_WarningMessage._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__WindowsConsoleIO._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___IOBase_closed._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___abc_tpflags__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___abs__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___abstractmethods__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___add__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___aenter__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___aexit__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___aiter__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___all__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___and__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___anext__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___annotate__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___annotate_func__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___annotations__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___annotations_cache__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___args__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___await__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___bases__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___bool__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___buffer__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___build_class__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___builtins__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___bytes__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___call__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___cantrace__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ceil__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___class__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___class_getitem__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___classcell__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___classdict__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___classdictcell__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___complex__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___conditional_annotations__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___contains__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ctypes_from_outparam__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___del__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___delattr__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___delete__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___delitem__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___dict__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___dictoffset__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___dir__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___divmod__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___doc__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___enter__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___eq__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___exit__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___file__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___firstlineno__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___float__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___floor__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___floordiv__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___format__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___fspath__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ge__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___get__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___getattr__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___getattribute__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___getinitargs__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___getitem__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___getnewargs__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___getnewargs_ex__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___getstate__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___gt__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___hash__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___iadd__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___iand__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ifloordiv__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ilshift__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___imatmul__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___imod__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___import__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___imul__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___index__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___init__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___init_subclass__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___instancecheck__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___int__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___invert__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ior__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ipow__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___irshift__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___isabstractmethod__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___isub__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___iter__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___itruediv__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ixor__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___lazy_import__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___lazy_modules__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___le__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___len__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___length_hint__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___lltrace__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___loader__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___lshift__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___lt__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___main__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___match_args__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___matmul__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___missing__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___mod__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___module__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___mro_entries__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___mul__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___name__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ne__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___neg__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___new__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___newobj__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___newobj_ex__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___next__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___notes__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___or__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___orig_class__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___origin__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___package__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___parameters__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___path__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___pos__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___pow__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___prepare__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___qualname__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___radd__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rand__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rdivmod__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___reduce__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___reduce_ex__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___release_buffer__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___repr__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___reversed__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rfloordiv__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rlshift__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rmatmul__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rmod__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rmul__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___ror__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___round__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rpow__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rrshift__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rshift__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rsub__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rtruediv__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___rxor__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___set__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___set_name__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___setattr__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___setitem__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___setstate__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___sizeof__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___slotnames__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___slots__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___spec__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___static_attributes__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___str__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___sub__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___subclasscheck__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___subclasshook__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___truediv__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___trunc__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___type_params__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___typing_is_unpacked_typevartuple__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___typing_prepare_subst__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___typing_subst__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___typing_unpacked_tuple_args__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___warningregistry__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___weaklistoffset__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___weakref__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py___xor__._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__abc_impl._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__abstract_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__active._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__anonymous_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__argtypes_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__as_parameter_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__asyncio_future_blocking._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__blksize._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__bootstrap._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__check_retval_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__dealloc_warn._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__feature_version._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__field_types._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__fields_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__filters._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__finalizing._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__find_and_load._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__find_and_load_lazy_submodule._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__fix_up_module._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__flags_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__get_sourcefile._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__handle_fromlist._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__initializing._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__internal_use._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__io._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__is_text_encoding._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__isatty_open_only._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__length_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__limbo._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__lock_unlock_module._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__loop._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__needs_com_addref_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__only_immortal._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__restype_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__showwarnmsg._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__shutdown._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__slotnames._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__strptime._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__strptime_datetime_date._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__strptime_datetime_datetime._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__strptime_datetime_time._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__type_._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__uninitialized_submodules._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__warn_unawaited_coroutine._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py__xoptions._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_abs_tol._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_access._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_aclose._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_add._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_add_done_callback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_adobe._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_after_in_child._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_after_in_parent._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_alias._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_align._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_all._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_all_interpreters._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_all_threads._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_allow_code._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_alphabet._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_any._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_append._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_arg._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_argdefs._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_args._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_arguments._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_argv._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_as_integer_ratio._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_asend._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_assoclen._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ast._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_athrow._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_attr._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_attribute._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_autocommit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_backtick._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_base._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_before._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_big._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_binary_form._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_bit_offset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_bit_size._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_block._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_blocking._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_bound._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_buffer._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_buffer_callback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_buffer_size._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_buffering._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_buffers._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_bufsize._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_builtins._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_byte_offset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_byte_size._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_byteorder._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_bytes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_bytes_per_sep._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_c_call._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_c_exception._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_c_parameter_type._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_c_return._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_c_stack._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cache_frames._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cached_datetime_module._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cached_statements._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cadata._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cafile._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_call._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_call_exception_handler._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_call_soon._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_callable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_callback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cancel._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_canonical._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_capath._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_capitals._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_category._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cb_type._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_certfile._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_chain._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_check_same_thread._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_clamp._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_clear._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_close._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_closed._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_closefd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_closure._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_argcount._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_cellvars._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_code._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_consts._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_exceptiontable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_filename._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_firstlineno._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_flags._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_freevars._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_kwonlyargcount._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_linetable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_name._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_names._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_nlocals._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_posonlyargcount._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_qualname._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_stacksize._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_co_varnames._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_code._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_col_offset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_collector._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_command._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_comment_factory._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_compile_mode._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_compression._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_config._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_consts._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_context._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_contravariant._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_conversion._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cookie._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_copy._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_copyreg._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_coro._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_count._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_covariant._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ctx._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_cwd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_d_parameter_type._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_data._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_database._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_date._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_day._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_days._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_debug._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_decode._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_decoder._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_default._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_defaultaction._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_delete._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_depth._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_desired_access._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_detect_types._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_deterministic._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_device._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_dict._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_difference_update._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_digest._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_digest_size._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_digestmod._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_dir_fd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_discard._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_dispatch_table._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_displayhook._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_dklen._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_doc._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_done._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_dont_inherit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_dst._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_dst_dir_fd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_duration_sec._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_eager_start._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_effective_ids._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_element_factory._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_emptyerror._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_encode._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_encoding._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_end._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_end_col_offset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_end_lineno._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_end_offset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_endpos._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_entrypoint._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_env._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_error_rate._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_errors._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_event._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_eventmask._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exc._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exc_tb._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exc_type._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exc_val._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exc_value._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_excepthook._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exception._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_existing_file_name._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_exp._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_expression._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_extend._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_extra_tokens._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_facility._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_factory._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fallback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_false._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_family._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fanout._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fd2._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fdel._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fget._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fields._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_file._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_file_actions._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_filename._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fileno._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_filepath._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fillvalue._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_filter._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_filters._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_final._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_find_class._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fix_imports._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_flags._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_flush._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fold._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_foldspaces._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_follow_symlinks._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_format._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_format_spec._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_frame_buffer._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_free_threaded._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_from_param._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fromlist._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fromtimestamp._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fromutc._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_fullerror._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_func._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_future._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_gc._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_generation._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_get._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_get_debug._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_get_loop._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_get_source._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_getattr._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_getstate._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_gid._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_globals._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_groupindex._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_groups._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_handle._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_handle_seq._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_has_location._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_hash_name._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_header._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_headers._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_hi._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_hook._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_host._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_hour._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_hours._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_id._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ident._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_identity_hint._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ignore._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ignorechars._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_imag._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_implieslink._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_importlib._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_in_fd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_include_aliases._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_incoming._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_index._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_indexgroup._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_inf._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_infer_variance._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_inherit_handle._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_inheritable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_initial._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_initial_bytes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_initial_owner._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_initial_state._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_initial_value._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_initval._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_inner_size._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_input._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_insert_comments._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_insert_pis._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_instructions._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_intern._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_intersection._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_interval._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_io._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_is_compress._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_is_raw._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_is_running._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_is_struct._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_isatty._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_isinstance._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_isoformat._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_isolation_level._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_istext._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_item._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_items._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_iter._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_iterable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_iterations._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_iv._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_join._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_jump._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_keepends._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_key._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_keyfile._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_keys._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_kind._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_kw._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_kw1._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_kw2._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_kwargs._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_kwdefaults._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_label._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_last._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_last_exc._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_last_node._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_last_traceback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_last_type._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_last_value._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_latin1._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_leaf_size._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_legacy._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_len._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_length._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_level._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_limit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_line._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_line_buffering._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_lineno._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_little._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_lo._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_locale._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_locals._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_logoption._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_loop._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_manual_reset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_mapping._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_mask._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_match._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_max_length._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_max_threads._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_maxdigits._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_maxevents._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_maxlen._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_maxmem._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_maxsize._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_maxsplit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_maxvalue._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_memLevel._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_memlimit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_message._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_metaclass._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_metadata._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_method._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_microsecond._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_microseconds._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_milliseconds._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_minute._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_minutes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_missed_samples._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_mod._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_mode._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_module._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_module_globals._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_modules._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_modulo._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_month._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_mro._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_msg._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_mutex._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_mycmp._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_n_fields._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_n_sequence_fields._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_n_unnamed_fields._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_name._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_name_from._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_namespace_separator._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_namespaces._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_native._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_nbytes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ndigits._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_nested._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_new_file_name._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_new_limit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_newline._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_newlines._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_next._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_nlocals._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_node_depth._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_node_offset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ns._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_nstype._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_nt._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_null._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_number._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_obj._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_object._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_offset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_offset_dst._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_offset_src._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_on_type_read._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_onceregistry._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_only_active_thread._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_only_keys._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_op._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_oparg._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_opcode._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_opcodes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_open._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_opener._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_operation._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_optimize._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_options._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_order._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_origin._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_other._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_out_fd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_outgoing._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_outpath._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_overlapped._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_owner._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pad._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_padded._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pages._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pair._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_parameter._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_parent._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_password._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_path._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pattern._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_peek._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_persistent_id._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_persistent_load._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_person._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pi_factory._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pid._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pidfd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pointer_bits._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_policy._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_port._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pos._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pos1._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_pos2._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_posix._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_prec._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_preserve_exc._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_print_file_and_line._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_priority._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_progress._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_progress_callback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_progress_routine._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_proto._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_protocol._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ps1._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_ps2._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_qid._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_qualname._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_query._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_queuetype._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_quotetabs._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_raw._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_read._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_read1._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_readable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_readall._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_readinto._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_readinto1._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_readline._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_readonly._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_real._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_recursive._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_reducer_override._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_registry._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_rel_tol._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_release._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_reload._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_repeat._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_repl._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_replace._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_repr._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_reqrefs._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_require_ready._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_reserved._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_reset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_resetids._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_restrict._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_return._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_reverse._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_reversed._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_rounding._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_salt._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sample_interval_us._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sample_rate._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sched_priority._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_scheduler._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_script._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_second._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_seconds._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_security_attributes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_seek._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_seekable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_selectors._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_self._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_send._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sep._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sequence._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_server_hostname._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_server_side._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_session._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_setpgroup._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_setsid._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_setsigdef._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_setsigmask._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_setstate._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_shape._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_shared._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_short._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_show_cmd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_signed._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_signum._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_size._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sizehint._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_skip_file_prefixes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_skip_non_matching_threads._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sleep._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sock._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sort._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_source._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_source_traceback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_spam._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_src._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_src_dir_fd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stack_frames._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stacklevel._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_start._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_start_time_us._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_statement._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stats._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_status._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stderr._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stdin._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stdout._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_step._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_steps._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stop_exception._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_stop_value._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_store_name._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_strategy._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_strftime._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_strict._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_strict_mode._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_string._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_sub_key._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_subcalls._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_symmetric_difference_update._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tabsize._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tag._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_take_bytes._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_target._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_target_is_directory._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_targetfd._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_task._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tb_frame._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tb_lasti._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tb_lineno._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tb_next._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tell._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_template._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_term._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_text._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_third._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_threading._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_throw._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_time._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_timeout._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_timer._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_times._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_timespec._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_timestamp._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_timestamp_us._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_timetuple._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_timeunit._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_top._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_traceback._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_trailers._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_translate._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_traps._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_true._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_truncate._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_twice._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_txt._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_type._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_type_params._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tz._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tzinfo._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_tzname._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_uid._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_unboundop._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_unlink._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_unraisablehook._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_updates._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_uri._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_usedforsecurity._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_utcoffset._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_value._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_values._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_version._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_volume._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_wait_all._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_warn_on_full_buffer._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_warnings._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_warnoptions._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_wbits._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_week._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_weekday._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_weeks._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_which._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_who._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_withdata._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_wrapcol._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_writable._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_write._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_write_through._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_year._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_zdict._ascii.ob_base), + offsetof(struct _Py_global_strings, identifiers._py_zstd_dict._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_empty._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_dbl_percent._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_dot_locals._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_defaults._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_format._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_generic_base._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_kwdefaults._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_type_params._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_str_replace_inf._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_gc._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_null._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_dictcomp._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_genexpr._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_lambda._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_listcomp._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_module._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_native._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_setcomp._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_string._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_anon_unknown._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_json_decoder._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_list_err._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_utf_8._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_dbl_open_br._ascii.ob_base), + offsetof(struct _Py_global_strings, literals._py_dbl_close_br._ascii.ob_base), + }; + char *base = (char *)&_Py_SINGLETON(strings); + for (size_t i = 0; i < Py_ARRAY_LENGTH(offsets); i++) { + PyObject *string = (PyObject *)(base + offsets[i]); + _PyUnicode_InternStatic(interp, &string); + assert(_PyUnicode_CheckConsistency(string, 1)); + assert(PyUnicode_GET_LENGTH(string) != 1); + } } /* End auto-generated code */ #ifdef __cplusplus diff --git a/Lib/subprocess.py b/Lib/subprocess.py index d38cc756ec479f..466f2c10a2c3d4 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -1629,21 +1629,31 @@ def _execute_child(self, args, executable, preexec_fn, close_fds, assert not pass_fds, "pass_fds not supported on Windows." if isinstance(args, str): - pass + # Filename is the program only. Later arguments can + # hold secrets. A leading quote ends at the next quote. + # Otherwise stop at the first space. + if args[:1] == '"': + end = args.find('"', 1) + orig_filename = args[1:end] if end != -1 else args + else: + orig_filename = args.split(' ', 1)[0] elif isinstance(args, bytes): if shell: raise TypeError('bytes args is not allowed on Windows') + orig_filename = os.fsdecode(args) args = list2cmdline([args]) elif isinstance(args, os.PathLike): if shell: raise TypeError('path-like args is not allowed when ' 'shell is true') + orig_filename = os.fsdecode(args) args = list2cmdline([args]) else: + args = list(args) + orig_filename = os.fsdecode(args[0]) if args else None args = list2cmdline(args) - if executable is not None: - executable = os.fsdecode(executable) + orig_filename = executable = os.fsdecode(executable) # Process startup details if startupinfo is None: @@ -1725,6 +1735,19 @@ def _execute_child(self, args, executable, preexec_fn, close_fds, env, cwd, startupinfo) + except OSError as e: + # gh-119646: POSIX already puts the attempted path on + # OSError.filename. Windows CreateProcess did not, so + # failures (missing exe, WSL paths, invalid cwd) were + # reported without naming the command. + if e.filename is None: + # ERROR_DIRECTORY (267): CreateProcess rejected cwd. + if cwd is not None and e.winerror == 267: + name = cwd + else: + name = orig_filename + raise type(e)(e.errno, e.strerror, name, e.winerror) from None + raise finally: # Child is launched. Close the parent's copy of those pipe # handles that only the child should have open. You need diff --git a/Lib/test/test_ctypes/test_find.py b/Lib/test/test_ctypes/test_find.py index 8bc84c3d2ef9f8..92175cc38eecf4 100644 --- a/Lib/test/test_ctypes/test_find.py +++ b/Lib/test/test_ctypes/test_find.py @@ -1,4 +1,5 @@ import os.path +import subprocess import sys import test.support import unittest @@ -78,9 +79,24 @@ def test_shell_injection(self): @unittest.skipUnless(sys.platform.startswith('linux'), 'Test only valid for Linux') class FindLibraryLinux(unittest.TestCase): + @classmethod + def setUpClass(cls): + try: + p = subprocess.run(['ld', '--version'], + stdout=subprocess.PIPE, + stderr=subprocess.DEVNULL, + text=True) + except OSError: + pass + else: + if p.stdout.startswith('mold '): + # The mold linker is known to be incompatible with + # the soft-deprecated ctypes.util.find_library + # (which uses `ld -t`). + raise unittest.SkipTest('Fails when ld is mold') + @thread_unsafe('uses setenv') def test_find_on_libpath(self): - import subprocess import tempfile try: diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index 1ff600e30bf4cb..9770fac956e649 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -2114,6 +2114,10 @@ def test_thread_state_ensure_from_view(self): def test_concurrent_finalization_stress(self): self.run_embedded_interpreter("test_concurrent_finalization_stress") + def test_py_getenv(self): + # Test Py_GETENV() before init, when initialized, and after finalize + self.run_embedded_interpreter("test_py_getenv") + class MiscTests(EmbeddingTestsMixin, unittest.TestCase): def test_unicode_id_init(self): diff --git a/Lib/test/test_free_threading/test_gc.py b/Lib/test/test_free_threading/test_gc.py index d1522a1d6da14e..30282a111345f8 100644 --- a/Lib/test/test_free_threading/test_gc.py +++ b/Lib/test/test_free_threading/test_gc.py @@ -5,7 +5,9 @@ import time from unittest import TestCase import gc +import weakref +from test import support from test.support import threading_helper @@ -95,6 +97,39 @@ def evil(): thread.start() thread.join() + def test_merge_brc_queue_of_detached_thread(self): + # GH-157838: objects queued for merging by a thread that is detached + # (blocked in a lock acquire, sleep, etc.) are merged and freed on its + # behalf instead of staying alive until it runs Python code again. + lock = threading.Lock() + lock.acquire() + ready = threading.Event() + objs = [] + + def worker(): + # Objects owned by this thread; only the list holds a reference. + objs.extend(MyObj() for _ in range(100)) + ready.set() + lock.acquire() # block while detached + + thread = Thread(target=worker) + thread.start() + try: + ready.wait() + # The worker may not have detached yet when the first objects + # are dropped; keep trying until one is freed immediately. + for _ in support.sleeping_retry(support.SHORT_TIMEOUT, error=False): + obj = objs.pop() + wr = weakref.ref(obj) + del obj + if wr() is None: + break + else: + self.fail("object not freed while owning thread was detached") + finally: + lock.release() + thread.join() + def test_gc_callbacks_race_with_mutation(self): def collect(): b.wait() diff --git a/Lib/test/test_memoryview.py b/Lib/test/test_memoryview.py index 3cb8a104faee5e..40d4798efbf18f 100644 --- a/Lib/test/test_memoryview.py +++ b/Lib/test/test_memoryview.py @@ -931,6 +931,24 @@ def test_picklebuffer_reference_loop(self): gc.collect() self.assertIsNone(wr()) + def test_overflows_in_floats(self): + half_data = array.array('e', [0.0]) + float_data = array.array('f', [0.0]) + complex_data = array.array('Zf', [123+321j]) + half_view = memoryview(half_data) + float_view = memoryview(float_data) + complex_view = memoryview(complex_data) + with self.assertRaises(ValueError): + half_view[0] = 123456.0 + with self.assertRaises(ValueError): + float_view[0] = 1e300 + with self.assertRaises(ValueError): + complex_view[0] = 1e300 + self.assertEqual(complex_view[0], 123+321j) + with self.assertRaises(ValueError): + complex_view[0] = 1e300j + self.assertEqual(complex_view[0], 123+321j) + @threading_helper.requires_working_threading() @support.requires_resource("cpu") diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index fc94b9a972828c..dedd3cc0e9e867 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1797,13 +1797,28 @@ def test_failed_child_execute_fd_leak(self): fds_after_exception = os.listdir(fd_directory) self.assertEqual(fds_before_popen, fds_after_exception) - @unittest.skipIf(mswindows, "behavior currently not supported on Windows") def test_file_not_found_includes_filename(self): + missing = (r'C:\opt\nonexistent_binary' if mswindows + else '/opt/nonexistent_binary') with self.assertRaises(FileNotFoundError) as c: - subprocess.call(['/opt/nonexistent_binary', 'with', 'some', 'args']) - self.assertEqual(c.exception.filename, '/opt/nonexistent_binary') + subprocess.call([missing, 'with', 'some', 'args']) + self.assertEqual(c.exception.filename, missing) + + def test_args_filter_iterable(self): + # gh-119646: Windows used to index args[0] before list2cmdline. + # test_faulthandler.test_sys_xoptions passes a filter() object. + args = filter(None, (sys.executable, "-c", "import sys; sys.exit(17)")) + self.assertEqual(subprocess.call(args), 17) + + def test_file_not_found_includes_filename_from_iterable(self): + missing = (r'C:\opt\nonexistent_binary' if mswindows + else '/opt/nonexistent_binary') + args = filter(None, (missing, "with", "some", "args")) + with self.assertRaises(FileNotFoundError) as c: + subprocess.call(args) + self.assertEqual(c.exception.filename, missing) - @unittest.skipIf(mswindows, "behavior currently not supported on Windows") + @unittest.skipIf(mswindows, "Windows reports NotADirectoryError (WinError 267)") def test_file_not_found_with_bad_cwd(self): with self.assertRaises(FileNotFoundError) as c: subprocess.Popen(['exit', '0'], cwd='/some/nonexistent/directory') @@ -3718,6 +3733,34 @@ def test_vfork_used_when_expected(self): @unittest.skipUnless(mswindows, "Windows specific tests") class Win32ProcessTestCase(BaseTestCase): + def test_createprocess_bad_cwd_includes_filename(self): + # gh-119646: invalid cwd should appear on OSError.filename. + missing_cwd = r'C:\some\nonexistent\directory' + with self.assertRaises(OSError) as c: + subprocess.Popen([sys.executable, '-c', 'pass'], cwd=missing_cwd) + self.assertEqual(c.exception.filename, missing_cwd) + self.assertEqual(c.exception.winerror, 267) + + def test_command_string_filename_omits_later_args(self): + # gh-119646: a command-line string must not put later arguments + # on OSError.filename. Those arguments can hold secrets. + missing = r'C:\opt\nonexistent_binary' + secret = 'NOT-A-REAL-SECRET' + quoted = r'C:\Program Files\nonexistent_binary' + cases = [ + (missing, missing), + (f'{missing} --token {secret}', missing), + (f'"{missing}" --token {secret}', missing), + (f'"{quoted}" --token {secret}', quoted), + ] + for command, expected in cases: + with self.subTest(command=command): + with self.assertRaises(FileNotFoundError) as c: + subprocess.call(command) + self.assertEqual(c.exception.filename, expected) + self.assertNotIn(secret, c.exception.filename or '') + self.assertNotIn(secret, str(c.exception)) + def test_startupinfo(self): # startupinfo argument # We uses hardcoded constants, because we do not want to diff --git a/Makefile.pre.in b/Makefile.pre.in index 67e00f102403d5..71952252ac9f11 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -631,6 +631,7 @@ LIBEXPAT_HEADERS= \ Modules/expat/expat_config.h \ Modules/expat/expat_external.h \ Modules/expat/fallthrough.h \ + Modules/expat/hash_table.h \ Modules/expat/iasciitab.h \ Modules/expat/internal.h \ Modules/expat/latin1tab.h \ diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-09-04-05-25-35.gh-issue-156865.7c5SBs.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-09-04-05-25-35.gh-issue-156865.7c5SBs.rst new file mode 100644 index 00000000000000..08df8d01465cda --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-09-04-05-25-35.gh-issue-156865.7c5SBs.rst @@ -0,0 +1,3 @@ +Raise :exc:`ValueError`'s for overflows, while trying to change +:class:`memoryview` elements with ``'f'`` and ``'Zf'`` format codes. Patch +by Sergey B Kirpichev. diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-09-22-12-00-00.gh-issue-157838.brcMrg.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-09-22-12-00-00.gh-issue-157838.brcMrg.rst new file mode 100644 index 00000000000000..931bcf99f32146 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-09-22-12-00-00.gh-issue-157838.brcMrg.rst @@ -0,0 +1 @@ +Merge biased reference counts on behalf of threads that are detached instead of waiting for them to attach again, in the free-threaded build. diff --git a/Misc/NEWS.d/next/Library/2026-09-17-17-30-00.gh-issue-119646.kP8nQm.rst b/Misc/NEWS.d/next/Library/2026-09-17-17-30-00.gh-issue-119646.kP8nQm.rst new file mode 100644 index 00000000000000..e546511677a93e --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-09-17-17-30-00.gh-issue-119646.kP8nQm.rst @@ -0,0 +1,2 @@ +On Windows, :exc:`OSError` from :mod:`subprocess` now includes the attempted +executable or working directory in ``filename``. diff --git a/Misc/NEWS.d/next/Security/2026-08-31-16-47-33.gh-issue-156723.KxCF5N.rst b/Misc/NEWS.d/next/Security/2026-08-31-16-47-33.gh-issue-157953.KxCF5N.rst similarity index 85% rename from Misc/NEWS.d/next/Security/2026-08-31-16-47-33.gh-issue-156723.KxCF5N.rst rename to Misc/NEWS.d/next/Security/2026-08-31-16-47-33.gh-issue-157953.KxCF5N.rst index 3dda6055f307d9..5b3ea77cb36863 100644 --- a/Misc/NEWS.d/next/Security/2026-08-31-16-47-33.gh-issue-156723.KxCF5N.rst +++ b/Misc/NEWS.d/next/Security/2026-08-31-16-47-33.gh-issue-157953.KxCF5N.rst @@ -1 +1 @@ -Update bundled `libexpat `_ to version 2.8.4. +Update bundled `libexpat `_ to version 2.8.5. diff --git a/Misc/sbom.spdx.json b/Misc/sbom.spdx.json index 8708cef4e2ab26..c6698f106a27ef 100644 --- a/Misc/sbom.spdx.json +++ b/Misc/sbom.spdx.json @@ -48,11 +48,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "12dffaa4a67cbe308643dbec7ffc1b4fd38abbde" + "checksumValue": "107e54c825529a59b79db8347be6fd9147acbbcd" }, { "algorithm": "SHA256", - "checksumValue": "0e912e25375e213b6e4ff90d554e0a0e037e6f0c20dfa734d366e5bdff289f20" + "checksumValue": "17cd1fc3b4c61d00de96091ceed0a3721d5bac9755c6d04e89d9f8a79d037c12" } ], "fileName": "Modules/expat/expat.h" @@ -62,11 +62,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "288700b1dd47ec564d2159a0a519bbc2f273b9e9" + "checksumValue": "bf25c623b9b0961f49d489b998a7cdf03b035614" }, { "algorithm": "SHA256", - "checksumValue": "d55e546603baf0b7085d6ff1d8f38d56d6de009a1731186509103c5d292c1a75" + "checksumValue": "ec35498736485b2321610a750e5b2534399fed87dc44bc4ace529eeb5a280a53" } ], "fileName": "Modules/expat/expat_external.h" @@ -85,6 +85,20 @@ ], "fileName": "Modules/expat/fallthrough.h" }, + { + "SPDXID": "SPDXRef-FILE-Modules-expat-hash-table.h", + "checksums": [ + { + "algorithm": "SHA1", + "checksumValue": "e0ab4fb3f3b06bac642dc525d98107337c3534d0" + }, + { + "algorithm": "SHA256", + "checksumValue": "ad93851f86df1f4e8f85488dbac53cab3539e59d701ad747c7beea354d69e0dc" + } + ], + "fileName": "Modules/expat/hash_table.h" + }, { "SPDXID": "SPDXRef-FILE-Modules-expat-iasciitab.h", "checksums": [ @@ -104,11 +118,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "4afd563c90edd6b4aa5abedcd3df5df023668d26" + "checksumValue": "ffa2c09f2e6d9d5d26be280dbada3c37a103340f" }, { "algorithm": "SHA256", - "checksumValue": "beb7211c800d827743bd3d6ddb86538302d6c51180be6d3b61a1c315e061762d" + "checksumValue": "0123d00963768b5779544cc54dcccad311824b192a38d3489c4fb1fbbfa33b17" } ], "fileName": "Modules/expat/internal.h" @@ -216,11 +230,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "b9e4628f37353a7eec8a98c26ebb88d7e2d48971" + "checksumValue": "c49f8f2f9b694175daffd870b86a767f4359f0a5" }, { "algorithm": "SHA256", - "checksumValue": "9afa5cb812283750f1970e230ba392201bac46240abf51ab65e5090e93ca34a6" + "checksumValue": "9a4969bb0ac497803866705f3fa233cc4b487e7685800d9222bd0ab38d1b8a20" } ], "fileName": "Modules/expat/xmlparse.c" @@ -230,11 +244,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "6e046b576085df9bb8f6b18f60ccf0f7a40308b5" + "checksumValue": "56999d78b6ed247b00b0e3283fd174065b04e40f" }, { "algorithm": "SHA256", - "checksumValue": "db4004fa2cabc811fc493b5b04b44cd336d19434bc653725f090131e43a89406" + "checksumValue": "b1ad87cc3c0d4722358a7dfb1642df7f62066d1613a0a56dc9289e7112fb3f0c" } ], "fileName": "Modules/expat/xmlrole.c" @@ -244,11 +258,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "4a3bf2554da3a7b02b0f2d4d07f446f7f6e34af5" + "checksumValue": "08de6d1246312e179918de3533328000c887a95b" }, { "algorithm": "SHA256", - "checksumValue": "486faffdfcd0c1668406648220c6638c98ddfe044d04d66551999ab8e02564fa" + "checksumValue": "8a0b61cd6efcd7427acbc86759e9013e7a61755097a1f82cbb2a79c011af5ee5" } ], "fileName": "Modules/expat/xmlrole.h" @@ -258,11 +272,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "c3377af96ec7fef8b502967ac818e3bfea04f584" + "checksumValue": "93a949a8b224b9ea56fa22f081f2378352ca6637" }, { "algorithm": "SHA256", - "checksumValue": "f2732a8e91fd901d75431d35edc421e1ff3893a275c4de1cc855b3d4deadfd37" + "checksumValue": "47ffd58f56f61284fd84cecd94ddad4c79cde922f57994c1525f8df1eb9272eb" } ], "fileName": "Modules/expat/xmltok.c" @@ -272,11 +286,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "e9a5972f664c1c530443ddd8b7900e406e3ca02a" + "checksumValue": "ecbd8a75bbe1bc5a82790553d73d4f11833dcdd2" }, { "algorithm": "SHA256", - "checksumValue": "41a6cef659ef1da9ee732304332c4134afe4b63571442de77eaf9918abf9e5df" + "checksumValue": "623dea24bc27712e2e205a0c0517c79e211234f8d1051fe46d780839f754cf9e" } ], "fileName": "Modules/expat/xmltok.h" @@ -286,11 +300,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "9f1c475da821ccf2763594c9b79175544af08d7a" + "checksumValue": "a27d1f15e18b9d7f91e4e2efd9cd88f6e9e1cd0e" }, { "algorithm": "SHA256", - "checksumValue": "c7b197b596192ad3f8c872ae9c0524e7dd85da10cb4bfdf29d630e12782dfbf7" + "checksumValue": "4dcd7ae88dd90bbc89d0e41ba6affb46a107ee28df3b49cb84cdf228b7cc7981" } ], "fileName": "Modules/expat/xmltok_impl.c" @@ -314,11 +328,11 @@ "checksums": [ { "algorithm": "SHA1", - "checksumValue": "974e4255236de201a718a1e5fc1c772356153415" + "checksumValue": "b2dd2b7fcb57fcecd95679b5b53cc92256eb0190" }, { "algorithm": "SHA256", - "checksumValue": "3c0c930dfdd484f98c6a32bd397919f3d2ee3701e6023effb463512af1849499" + "checksumValue": "ea723a3470d3eed5c4a4e873bec2f996c605326fad25709b45452664261c5465" } ], "fileName": "Modules/expat/xmltok_ns.c" @@ -1044,14 +1058,14 @@ "checksums": [ { "algorithm": "SHA256", - "checksumValue": "b8ece2437692dad44d851c4532723390a5a330990007706be9c8d2b90d294f36" + "checksumValue": "920dde485e15eda0cce8d2310b41d492c534e5e3d89ad407a0b4176dd2ff88fe" } ], - "downloadLocation": "https://github.com/libexpat/libexpat/releases/download/R_2_8_4/expat-2.8.4.tar.gz", + "downloadLocation": "https://github.com/libexpat/libexpat/releases/download/R_2_8_5/expat-2.8.5.tar.gz", "externalRefs": [ { "referenceCategory": "SECURITY", - "referenceLocator": "cpe:2.3:a:libexpat_project:libexpat:2.8.4:*:*:*:*:*:*:*", + "referenceLocator": "cpe:2.3:a:libexpat_project:libexpat:2.8.5:*:*:*:*:*:*:*", "referenceType": "cpe23Type" } ], @@ -1059,7 +1073,7 @@ "name": "expat", "originator": "Organization: Expat development team", "primaryPackagePurpose": "SOURCE", - "versionInfo": "2.8.4" + "versionInfo": "2.8.5" }, { "SPDXID": "SPDXRef-PACKAGE-hacl-star", @@ -1137,6 +1151,11 @@ "relationshipType": "CONTAINS", "spdxElementId": "SPDXRef-PACKAGE-expat" }, + { + "relatedSpdxElement": "SPDXRef-FILE-Modules-expat-hash-table.h", + "relationshipType": "CONTAINS", + "spdxElementId": "SPDXRef-PACKAGE-expat" + }, { "relatedSpdxElement": "SPDXRef-FILE-Modules-expat-iasciitab.h", "relationshipType": "CONTAINS", diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml index 36d4f094f9e85a..8ae17142dcc67a 100644 --- a/Misc/stable_abi.toml +++ b/Misc/stable_abi.toml @@ -95,6 +95,8 @@ windows = 'maybe' +### Python 3.2 (initial version) ############################################ + # Mentioned in PEP 384: [struct.PyObject] @@ -627,8 +629,6 @@ added = '3.2' [function.PyErr_Display] added = '3.2' -[function.PyErr_DisplayException] - added = '3.12' [function.PyErr_ExceptionMatches] added = '3.2' [function.PyErr_Fetch] @@ -735,8 +735,6 @@ added = '3.2' [data.PyExc_BaseException] added = '3.2' -[data.PyExc_BaseExceptionGroup] - added = '3.11' [data.PyExc_BufferError] added = '3.2' [data.PyExc_BytesWarning] @@ -1867,6 +1865,9 @@ [function.PyThread_start_new_thread] added = '3.2' + +### Python 3.3 ############################################################## + # The following were added in PC/python3.def in Python 3.3: # 7800f75827b1be557be16f3b18f5170fbf9fae08 # 9c56409d3353b8cd4cfc19e0467bbe23fd34fc92 @@ -1896,6 +1897,9 @@ [function.PyThread_GetInfo] added = '3.3' + +### Python 3.4 ############################################################## + # The following were added in PC/python3.def in Python 3.4: # 3ba3a3ee56c142e93d6bbe20ff6bf939212a30f0 @@ -1904,6 +1908,9 @@ [function.PyType_GetSlot] added = '3.4' + +### Python 3.5 ############################################################## + # The following were added in PC/python3.def in Python 3.5: # 11d7b1423fc44d764eba7065ea5eba58ed748b21 # f3b73ad51da3097d7915796fdc62608b1ab90c0a @@ -1942,6 +1949,9 @@ [const.Py_tp_finalize] added = '3.5' + +### Python 3.6 ############################################################## + # The following were added in PC/python3.def in Python 3.6: [function.Py_FinalizeEx] @@ -1956,6 +1966,9 @@ [data.PyExc_ModuleNotFoundError] added = '3.6' + +### Python 3.7 ############################################################## + # The following were added in PC/python3.def in Python 3.6.1 and 3.5.3/3.5.4: [function.PyCodec_NameReplaceErrors] @@ -2151,6 +2164,9 @@ [const.METH_METHOD] added = '3.7' + +### Python 3.8 ############################################################## + # The following were added in PC/python3.def in Python 3.8: [function.PyImport_GetModule] @@ -2174,11 +2190,14 @@ [function.Py_BytesMain] added = '3.8' -# New type flag (PEP 590): +# New type flag in Python 3.8 (PEP 590): [const.Py_TPFLAGS_METHOD_DESCRIPTOR] added = '3.8' + +### Python 3.9 ############################################################## + # The following were added in PC/python3.def in Python 3.9: [function.Py_EnterRecursiveCall] @@ -2198,6 +2217,9 @@ [function.PyObject_GC_IsTracked] added = '3.9' + +### Python 3.10 ############################################################# + # The following were added in PC/python3.def in Python 3.10: [function.Py_GetArgcArgv] @@ -2262,7 +2284,11 @@ [data.PyExc_EncodingWarning] added = '3.10' -# Support for Stable ABI in debug builds +# Added in 3.7 but in the Stable ABI from 3.10 +[const.METH_FASTCALL] + added = '3.10' + +# Support for Stable ABI in debug builds (Python 3.10) [data._Py_RefTotal] added = '3.10' @@ -2273,13 +2299,13 @@ ifdef = 'Py_REF_DEBUG' abi_only = true -# New slots in 3.10: +# New slots in Python 3.10: [const.Py_am_send] added = '3.10' -# New GC control functions in Py3.10 (https://bugs.python.org/issue28254) +# New GC control functions in Python 3.10 (https://github.com/python/cpython/issues/72441) [function.PyGC_Disable] added = '3.10' @@ -2288,8 +2314,11 @@ [function.PyGC_IsEnabled] added = '3.10' -# Add new C API in Python 3.11 +### Python 3.11 ############################################################# + +[data.PyExc_BaseExceptionGroup] + added = '3.11' [function.PyType_GetName] added = '3.11' [function.PyType_GetQualName] @@ -2297,10 +2326,6 @@ [data.PyStructSequence_UnnamedField] added = '3.11' -# Added in 3.7 but in the Stable ABI from 3.10 -[const.METH_FASTCALL] - added = '3.10' - # Add stable Py_buffer API in Python 3.11 (https://bugs.python.org/issue45459) [struct.Py_buffer] added = '3.11' @@ -2379,7 +2404,6 @@ [const.PyBUF_WRITE] added = '3.11' - # (Detailed comments aren't really needed for further entries: from here on # we can use version control logs.) @@ -2390,6 +2414,11 @@ [function.PyErr_SetHandledException] added = '3.11' + +### Python 3.12 ############################################################# + +[function.PyErr_DisplayException] + added = '3.12' [function.PyType_FromMetaclass] added = '3.12' [const.Py_TPFLAGS_HAVE_VECTORCALL] @@ -2473,6 +2502,9 @@ # Note: value changed in 3.15 (old value is still accepted) added = '3.12' + +### Python 3.13 ############################################################# + [function.PyImport_AddModuleRef] added = '3.13' [function.PyWeakref_GetRef] @@ -2555,6 +2587,9 @@ # Note: value changed in 3.15 (old value is still accepted) added = '3.13' + +### Python 3.14 ############################################################# + [function.Py_TYPE] # Before 3.14, this was a macro that accessed the PyObject member added = '3.14' @@ -2616,6 +2651,9 @@ [function.Py_PACK_VERSION] added = '3.14' + +### Python 3.15 ############################################################# + [function.PySys_GetAttr] added = '3.15' [function.PySys_GetAttrString] @@ -2773,10 +2811,10 @@ added = '3.15' [const.Py_tp_module] added = '3.15' -[function.Py_HashBuffer] - added = '3.16' +[function.PyObject_CallFinalizerFromDealloc] + added = '3.15' -# PEP 757 import/export API. +# Python 3.15 PEP 757 import/export API. [function.PyLong_GetNativeLayout] added = '3.15' @@ -2802,7 +2840,7 @@ # (The definition of 'full-abi' was clarified when this entry was added.) struct_abi_kind = 'full-abi' -# PEP 788 finalization protection +# Python 3.15 PEP 788 finalization protection [struct.PyInterpreterGuard] added = '3.15' @@ -2832,5 +2870,8 @@ added = '3.15' struct_abi_kind = 'opaque' -[function.PyObject_CallFinalizerFromDealloc] - added = '3.15' + +### Python 3.16 ############################################################# + +[function.Py_HashBuffer] + added = '3.16' diff --git a/Modules/expat/expat.h b/Modules/expat/expat.h index b296be9dbad2dc..4c3851d50a5fdf 100644 --- a/Modules/expat/expat.h +++ b/Modules/expat/expat.h @@ -20,6 +20,7 @@ Copyright (c) 2023 Sony Corporation / Snild Dolkow Copyright (c) 2024 Taichi Haradaguchi <20001722@ymail.ne.jp> Copyright (c) 2025 Matthew Fernandez + Copyright (c) 2026 Braian Plaku Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -921,7 +922,9 @@ XML_SetParamEntityParsing(XML_Parser parser, Returns 1 if successful, 0 when called after parsing has started. Note: If parser == NULL, the function will do nothing and return 0. DEPRECATED since Expat 2.8.0. + Please use XML_SetHashSalt16Bytes instead. */ +XML_ATTR_DEPRECATED("please use XML_SetHashSalt16Bytes instead") XMLPARSEAPI(int) XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt); @@ -1040,8 +1043,11 @@ enum XML_FeatureEnum { XML_FEATURE_MIN_SIZE, XML_FEATURE_SIZEOF_XML_CHAR, XML_FEATURE_SIZEOF_XML_LCHAR, + /* Added in Expat 2.0.0. */ XML_FEATURE_NS, + /* Added in Expat 2.0.1. */ XML_FEATURE_LARGE_SIZE, + /* Added in Expat 2.1.0. */ XML_FEATURE_ATTR_INFO, /* Added in Expat 2.4.0. */ XML_FEATURE_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT, @@ -1096,7 +1102,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled); */ # define XML_MAJOR_VERSION 2 # define XML_MINOR_VERSION 8 -# define XML_MICRO_VERSION 4 +# define XML_MICRO_VERSION 5 # ifdef __cplusplus } diff --git a/Modules/expat/expat_external.h b/Modules/expat/expat_external.h index 6cc3f19ed7dbc8..a6c8a97881795e 100644 --- a/Modules/expat/expat_external.h +++ b/Modules/expat/expat_external.h @@ -16,6 +16,7 @@ Copyright (c) 2017 Rhodri James Copyright (c) 2018 Yury Gribov Copyright (c) 2026 Matthew Fernandez + Copyright (c) 2026 Braian Plaku Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -128,6 +129,17 @@ # define XML_ATTR_ALLOC_SIZE(x) # endif +/* Marks a function that Expat still provides but that callers should move off + of. */ +# if defined(__clang__) || defined(__GNUC__) +# define XML_ATTR_DEPRECATED(message) \ + __attribute__((__deprecated__(message))) +# elif defined(_MSC_VER) +# define XML_ATTR_DEPRECATED(message) __declspec(deprecated(message)) +# else +# define XML_ATTR_DEPRECATED(message) // empty i.e. no deprecation +# endif + # define XMLPARSEAPI(type) XMLIMPORT type XMLCALL # ifdef __cplusplus diff --git a/Modules/expat/hash_table.h b/Modules/expat/hash_table.h new file mode 100644 index 00000000000000..f290aad18693fe --- /dev/null +++ b/Modules/expat/hash_table.h @@ -0,0 +1,78 @@ +/* Hash table related internal API + __ __ _ + ___\ \/ /_ __ __ _| |_ + / _ \\ /| '_ \ / _` | __| + | __// \| |_) | (_| | |_ + \___/_/\_\ .__/ \__,_|\__| + |_| XML parser + + Copyright (c) 2026 Sebastian Pipping + Licensed under the MIT license: + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to permit + persons to whom the Software is furnished to do so, subject to the + following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN + NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + USE OR OTHER DEALINGS IN THE SOFTWARE. + + SPDX-License-Identifier: MIT +*/ + +#if ! defined(HASH_TABLE_H) +# define HASH_TABLE_H 1 + +# include "expat.h" // for XML_Bool, XML_Parser +# include "internal.h" // for XML_NONTESTING_STATIC + +# include // for size_t + +typedef const XML_Char *KEY; + +typedef struct { + KEY name; +} NAMED; + +typedef struct { + NAMED **v; + unsigned char power; + size_t size; + size_t used; + XML_Parser parser; +} HASH_TABLE; + +typedef struct { + NAMED **p; + NAMED **end; +} HASH_TABLE_ITER; + +XML_NONTESTING_STATIC NAMED *lookupWithLength(XML_Parser parser, + HASH_TABLE *table, KEY name, + size_t nameLen, + size_t createSize); +XML_NONTESTING_STATIC NAMED *lookup(XML_Parser parser, HASH_TABLE *table, + KEY name, size_t createSize); + +XML_NONTESTING_STATIC void hashTableInit(HASH_TABLE *table, XML_Parser parser); +XML_NONTESTING_STATIC void hashTableClear(HASH_TABLE *table); +XML_NONTESTING_STATIC void hashTableDestroy(HASH_TABLE *table); +XML_NONTESTING_STATIC void hashTableIterInit(HASH_TABLE_ITER *iter, + const HASH_TABLE *table); +XML_NONTESTING_STATIC NAMED *hashTableIterNext(HASH_TABLE_ITER *iter); + +XML_NONTESTING_STATIC XML_Bool keyeq(KEY s1, size_t s1len, KEY s2); +XML_NONTESTING_STATIC size_t keylen(KEY s); + +#endif // ! defined(HASH_TABLE_H) diff --git a/Modules/expat/internal.h b/Modules/expat/internal.h index 6311028e94b8f5..86655371d29033 100644 --- a/Modules/expat/internal.h +++ b/Modules/expat/internal.h @@ -6,13 +6,6 @@ The following calling convention macros are defined for frequently called functions: - FASTCALL - Used for those internal functions that have a simple - body and a low number of arguments and local variables. - - PTRCALL - Used for functions called though function pointers. - - PTRFASTCALL - Like PTRCALL, but for low number of arguments. - inline - Used for selected internal functions for which inlining may improve performance on some platforms. @@ -34,6 +27,8 @@ Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow Copyright (c) 2024 Taichi Haradaguchi <20001722@ymail.ne.jp> Copyright (c) 2026 Matthew Wozniczka + Copyright (c) 2026 Braian Plaku + Copyright (c) 2026 Florian Schmaus Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -58,132 +53,104 @@ SPDX-License-Identifier: MIT */ -#if defined(__GNUC__) && defined(__i386__) && ! defined(__MINGW32__) -/* We'll use this version by default only where we know it helps. - - regparm() generates warnings on Solaris boxes. See SF bug #692878. - - Instability reported with egcs on a RedHat Linux 7.3. - Let's comment out: - #define FASTCALL __attribute__((stdcall, regparm(3))) - and let's try this: -*/ -# define FASTCALL __attribute__((regparm(3))) -# define PTRFASTCALL __attribute__((regparm(3))) -#endif - -/* Using __fastcall seems to have an unexpected negative effect under - MS VC++, especially for function pointers, so we won't use it for - now on that platform. It may be reconsidered for a future release - if it can be made more effective. - Likely reason: __fastcall on Windows is like stdcall, therefore - the compiler cannot perform stack optimizations for call clusters. -*/ - -/* Make sure all of these are defined if they aren't already. */ - -#ifndef FASTCALL -# define FASTCALL -#endif +#if ! defined(INTERNAL_H) +# define INTERNAL_H 1 -#ifndef PTRCALL -# define PTRCALL -#endif - -#ifndef PTRFASTCALL -# define PTRFASTCALL -#endif - -#ifndef XML_MIN_SIZE -# if ! defined(__cplusplus) && ! defined(inline) -# ifdef __GNUC__ -# define inline __inline -# endif /* __GNUC__ */ -# endif -#endif /* XML_MIN_SIZE */ +# ifndef XML_MIN_SIZE +# if ! defined(inline) +# ifdef __GNUC__ +# define inline __inline +# endif /* __GNUC__ */ +# endif +# endif /* XML_MIN_SIZE */ -#ifdef __cplusplus -# define inline inline -#else # ifndef inline # define inline # endif -#endif - -#include // ULONG_MAX -#include // size_t - -#if defined(_WIN32) \ - && (! defined(__USE_MINGW_ANSI_STDIO) \ - || (1 - __USE_MINGW_ANSI_STDIO - 1 == 0)) -# define EXPAT_FMT_LLX(midpart) "%" midpart "I64x" -# define EXPAT_FMT_ULL(midpart) "%" midpart "I64u" -# if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW -# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d" -# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "I64u" + +# if ! defined(XML_NONTESTING_STATIC) +# if defined(XML_TESTING) +# define XML_NONTESTING_STATIC // empty i.e. not static +# else +# define XML_NONTESTING_STATIC static +# endif +# endif + +# include // ULONG_MAX +# include // size_t + +# if defined(_WIN32) \ + && (! defined(__USE_MINGW_ANSI_STDIO) \ + || (1 - __USE_MINGW_ANSI_STDIO - 1 == 0)) +# define EXPAT_FMT_LLX(midpart) "%" midpart "I64x" +# define EXPAT_FMT_ULL(midpart) "%" midpart "I64u" +# if defined(_WIN64) // Note: modifiers "td" and "zu" do not work for MinGW +# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "I64d" +# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "I64u" +# else +# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d" +# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u" +# endif # else -# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart "d" -# define EXPAT_FMT_SIZE_T(midpart) "%" midpart "u" +# include // PRIdPTR, PRIuPTR +# define EXPAT_FMT_LLX(midpart) "%" midpart "llx" +# define EXPAT_FMT_ULL(midpart) "%" midpart "llu" +# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart PRIdPTR +# define EXPAT_FMT_SIZE_T(midpart) "%" midpart PRIuPTR +# endif + +# ifndef UNUSED_P +# define UNUSED_P(p) (void)p # endif -#else -# include // PRIdPTR, PRIuPTR -# define EXPAT_FMT_LLX(midpart) "%" midpart "llx" -# define EXPAT_FMT_ULL(midpart) "%" midpart "llu" -# define EXPAT_FMT_PTRDIFF_T(midpart) "%" midpart PRIdPTR -# define EXPAT_FMT_SIZE_T(midpart) "%" midpart PRIuPTR -#endif - -#ifndef UNUSED_P -# define UNUSED_P(p) (void)p -#endif /* NOTE BEGIN If you ever patch these defaults to greater values for non-attack XML payload in your environment, please file a bug report with libexpat. Thank you! */ -#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT \ - 100.0f -#define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT \ - 8388608 // 8 MiB, 2^23 +# define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT \ + 100.0f +# define EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT \ + 8388608 // 8 MiB, 2^23 -#define EXPAT_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION_DEFAULT 100.0f -#define EXPAT_ALLOC_TRACKER_ACTIVATION_THRESHOLD_DEFAULT \ - 67108864 // 64 MiB, 2^26 +# define EXPAT_ALLOC_TRACKER_MAXIMUM_AMPLIFICATION_DEFAULT 100.0f +# define EXPAT_ALLOC_TRACKER_ACTIVATION_THRESHOLD_DEFAULT \ + 67108864 // 64 MiB, 2^26 // NOTE: If function expat_alloc was user facing, EXPAT_MALLOC_ALIGNMENT would // have to take sizeof(long double) into account -#define EXPAT_MALLOC_ALIGNMENT sizeof(long long) // largest parser (sub)member -#define EXPAT_MALLOC_PADDING ((EXPAT_MALLOC_ALIGNMENT) - sizeof(size_t)) +union expat_align { + long long l; + void *p; +}; +# define EXPAT_MALLOC_ALIGNMENT sizeof(union expat_align) +# define EXPAT_MALLOC_PADDING ((EXPAT_MALLOC_ALIGNMENT) - sizeof(size_t)) /* NOTE END */ -#include "expat.h" // so we can use type XML_Parser below - -#ifdef __cplusplus -extern "C" { -#endif +# include "expat.h" // so we can use type XML_Parser below void _INTERNAL_trim_to_complete_utf8_characters(const char *from, const char **fromLimRef); -#if defined(XML_GE) && XML_GE == 1 +# if defined(XML_GE) && XML_GE == 1 unsigned long long testingAccountingGetCountBytesDirect(XML_Parser parser); unsigned long long testingAccountingGetCountBytesIndirect(XML_Parser parser); const char *unsignedCharToPrintable(unsigned char c); -#endif +# endif extern -#if ! defined(XML_TESTING) +# if ! defined(XML_TESTING) const -#endif +# endif XML_Bool g_reparseDeferralEnabledDefault; // written ONLY in runtests.c -#if defined(XML_TESTING) +# if defined(XML_TESTING) + +int xmlSetHashSalt(XML_Parser parser, unsigned long hash_salt); + void *expat_malloc(XML_Parser parser, size_t size, int sourceLine); void expat_free(XML_Parser parser, void *ptr, int sourceLine); void *expat_realloc(XML_Parser parser, void *ptr, size_t size, int sourceLine); extern unsigned int g_bytesScanned; // used for testing only -#endif +# endif -#ifdef __cplusplus -} -#endif +#endif // not defined INTERNAL_H diff --git a/Modules/expat/refresh.sh b/Modules/expat/refresh.sh index ef06e87122aa26..aa33c73d3094f9 100755 --- a/Modules/expat/refresh.sh +++ b/Modules/expat/refresh.sh @@ -12,9 +12,9 @@ fi # Update this when updating to a new version after verifying that the changes # the update brings in are good. These values are used for verifying the SBOM, too. -expected_libexpat_tag="R_2_8_4" -expected_libexpat_version="2.8.4" -expected_libexpat_sha256="b8ece2437692dad44d851c4532723390a5a330990007706be9c8d2b90d294f36" +expected_libexpat_tag="R_2_8_5" +expected_libexpat_version="2.8.5" +expected_libexpat_sha256="920dde485e15eda0cce8d2310b41d492c534e5e3d89ad407a0b4176dd2ff88fe" expat_dir="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")" cd ${expat_dir} @@ -34,6 +34,7 @@ lib_files=( expat.h expat_external.h fallthrough.h + hash_table.h iasciitab.h internal.h latin1tab.h diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c index 9a05da21d5a7fd..9fb4f9d480a2e3 100644 --- a/Modules/expat/xmlparse.c +++ b/Modules/expat/xmlparse.c @@ -1,4 +1,4 @@ -/* 13c4e8da8fccffb0e8e599684e0d447ad14c1bb0b48792cf5dd77d8712301871 (2.8.4+) +/* 0864fe2d216f47b742263b698bc051c865b342e8b820e42c234717098ea507e3 (2.8.5+) __ __ _ ___\ \/ /_ __ __ _| |_ / _ \\ /| '_ \ / _` | __| @@ -54,6 +54,8 @@ Copyright (c) 2026 Darren Carreras Copyright (c) 2026 Alberto Maschietto Copyright (c) 2026 Zeyou Liu + Copyright (c) 2026 Stan Ulbrych + Copyright (c) 2026 Braian Plaku Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -226,25 +228,10 @@ typedef char ICHAR; #define EXPAT_MIN(a, b) (((a) < (b)) ? (a) : (b)) #include "internal.h" +#include "hash_table.h" #include "xmltok.h" #include "xmlrole.h" -typedef const XML_Char *KEY; - -typedef struct { - KEY name; -} NAMED; - -typedef struct { - NAMED **v; - unsigned char power; - size_t size; - size_t used; - XML_Parser parser; -} HASH_TABLE; - -static size_t keylen(KEY s); - static void copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key); /* For probing (after a collision) we need a step size relative prime @@ -260,11 +247,6 @@ static void copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key); #define PROBE_STEP(hash, mask, power) \ ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1)) -typedef struct { - NAMED **p; - NAMED **end; -} HASH_TABLE_ITER; - #define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */ #define INIT_DATA_BUF_SIZE 1024 #define INIT_ATTS_SIZE 16 @@ -334,12 +316,12 @@ typedef struct { const XML_Char *publicId; const XML_Char *notation; bool open; - XML_Bool hasMore; /* true if entity has not been completely processed */ - /* An entity can be open while being already completely processed (hasMore == - XML_FALSE). The reason is the delayed closing of entities until their inner + bool hasMore; /* true if entity has not been completely processed */ + /* An entity can be open while being already completely processed (!hasMore). + The reason is the delayed closing of entities until their inner entities are processed and closed */ - XML_Bool is_param; - XML_Bool is_internal; /* true if declared in internal subset outside PE */ + bool is_param; + bool is_internal; /* true if declared in internal subset outside PE */ } ENTITY; typedef struct { @@ -374,8 +356,8 @@ typedef struct { typedef struct attribute_id { XML_Char *name; PREFIX *prefix; - XML_Bool maybeTokenized; - XML_Bool xmlns; + bool maybeTokenized; + bool xmlns; } ATTRIBUTE_ID; typedef struct { @@ -431,12 +413,12 @@ typedef struct { XML_Bool standalone; #ifdef XML_DTD /* indicates if external PE has been read */ - XML_Bool paramEntityRead; + bool paramEntityRead; HASH_TABLE paramEntities; #endif /* XML_DTD */ PREFIX defaultPrefix; /* === scaffolding for building content model === */ - XML_Bool in_eldecl; + bool in_eldecl; CONTENT_SCAFFOLD *scaffold; unsigned contentStringLen; unsigned scaffSize; @@ -458,7 +440,7 @@ typedef struct open_internal_entity { struct open_internal_entity *next; ENTITY *entity; int startTagLevel; - XML_Bool betweenDecl; /* WFC: PE Between Declarations */ + bool betweenDecl; /* WFC: PE Between Declarations */ enum EntityType type; } OPEN_INTERNAL_ENTITY; @@ -495,8 +477,8 @@ typedef struct entity_stats { } ENTITY_STATS; #endif /* XML_GE == 1 */ -typedef enum XML_Error PTRCALL Processor(XML_Parser parser, const char *start, - const char *end, const char **endPtr); +typedef enum XML_Error Processor(XML_Parser parser, const char *start, + const char *end, const char **endPtr); static Processor prologProcessor; static Processor prologInitProcessor; @@ -528,7 +510,7 @@ static enum XML_Error doProlog(XML_Parser parser, const ENCODING *enc, XML_Bool haveMore, XML_Bool allowClosingDoctype, enum XML_Account account); static enum XML_Error processEntity(XML_Parser parser, ENTITY *entity, - XML_Bool betweenDecl, enum EntityType type); + bool betweenDecl, enum EntityType type); static enum XML_Error doContent(XML_Parser parser, int startTagLevel, const ENCODING *enc, const char *start, const char *end, const char **endPtr, @@ -588,7 +570,7 @@ static void reportDefault(XML_Parser parser, const ENCODING *enc, static const XML_Char *getContext(XML_Parser parser); static XML_Bool setContext(XML_Parser parser, const XML_Char *context); -static void FASTCALL normalizePublicId(XML_Char *s); +static void normalizePublicId(XML_Char *s); static DTD *dtdCreate(XML_Parser parser); /* do not call if m_parentParser != NULL */ @@ -598,36 +580,24 @@ static int dtdCopy(XML_Parser oldParser, DTD *newDtd, const DTD *oldDtd, XML_Parser parser); static int copyEntityTable(XML_Parser oldParser, HASH_TABLE *newTable, STRING_POOL *newPool, const HASH_TABLE *oldTable); -static NAMED *lookupWithLength(XML_Parser parser, HASH_TABLE *table, KEY name, - size_t nameLen, size_t createSize); -static NAMED *lookup(XML_Parser parser, HASH_TABLE *table, KEY name, - size_t createSize); -static void FASTCALL hashTableInit(HASH_TABLE *table, XML_Parser parser); -static void FASTCALL hashTableClear(HASH_TABLE *table); -static void FASTCALL hashTableDestroy(HASH_TABLE *table); -static void FASTCALL hashTableIterInit(HASH_TABLE_ITER *iter, - const HASH_TABLE *table); -static NAMED *FASTCALL hashTableIterNext(HASH_TABLE_ITER *iter); - -static void FASTCALL poolInit(STRING_POOL *pool, XML_Parser parser); -static void FASTCALL poolClear(STRING_POOL *pool); -static void FASTCALL poolDestroy(STRING_POOL *pool); + +static void poolInit(STRING_POOL *pool, XML_Parser parser); +static void poolClear(STRING_POOL *pool); +static void poolDestroy(STRING_POOL *pool); static XML_Char *poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end); static XML_Char *poolStoreString(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end); -static XML_Bool FASTCALL poolGrow(STRING_POOL *pool); -static bool FASTCALL poolGrowUntil(STRING_POOL *pool, size_t needed); -static const XML_Char *FASTCALL poolCopyString(STRING_POOL *pool, - const XML_Char *s); -static const XML_Char *FASTCALL poolCopyStringNoFinish(STRING_POOL *pool, - const XML_Char *s); +static XML_Bool poolGrow(STRING_POOL *pool); +static bool poolGrowUntil(STRING_POOL *pool, size_t needed); +static const XML_Char *poolCopyString(STRING_POOL *pool, const XML_Char *s); +static const XML_Char *poolCopyStringNoFinish(STRING_POOL *pool, + const XML_Char *s); static const XML_Char *poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n); -static const XML_Char *FASTCALL poolAppendString(STRING_POOL *pool, - const XML_Char *s); +static const XML_Char *poolAppendString(STRING_POOL *pool, const XML_Char *s); -static int FASTCALL nextScaffoldPart(XML_Parser parser); +static int nextScaffoldPart(XML_Parser parser); static XML_Content *build_model(XML_Parser parser); static ELEMENT_TYPE *getElementType(XML_Parser parser, const ENCODING *enc, const char *ptr, const char *end); @@ -1596,7 +1566,7 @@ parserInit(XML_Parser parser, const XML_Char *encodingName) { } /* moves list of bindings to m_freeBindingList */ -static void FASTCALL +static void moveToFreeBindingList(XML_Parser parser, BINDING *bindings) { while (bindings) { BINDING *b = bindings; @@ -1869,7 +1839,7 @@ XML_ExternalEntityParserCreate(XML_Parser oldParser, const XML_Char *context, return parser; } -static void FASTCALL +static void destroyBindings(BINDING *bindings, XML_Parser parser) { for (;;) { BINDING *b = bindings; @@ -2268,9 +2238,10 @@ XML_SetParamEntityParsing(XML_Parser parser, #endif } -// DEPRECATED since Expat 2.8.0. -int XMLCALL -XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) { +/* The body of XML_SetHashSalt, so that Expat's own tests can reach it + without tripping the deprecation of the public function. */ +XML_NONTESTING_STATIC int +xmlSetHashSalt(XML_Parser parser, unsigned long hash_salt) { if (parser == NULL) return 0; @@ -2296,6 +2267,12 @@ XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) { return 1; } +// DEPRECATED since Expat 2.8.0. +int XMLCALL +XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) { + return xmlSetHashSalt(parser, hash_salt); +} + XML_Bool XMLCALL XML_SetHashSalt16Bytes(XML_Parser parser, const uint8_t entropy[16]) { if (parser == NULL) @@ -3168,7 +3145,7 @@ storeRawNames(XML_Parser parser) { return XML_TRUE; } -static enum XML_Error PTRCALL +static enum XML_Error contentProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doContent( @@ -3182,7 +3159,7 @@ contentProcessor(XML_Parser parser, const char *start, const char *end, return result; } -static enum XML_Error PTRCALL +static enum XML_Error externalEntityInitProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = initializeEncoding(parser); @@ -3192,7 +3169,7 @@ externalEntityInitProcessor(XML_Parser parser, const char *start, return externalEntityInitProcessor2(parser, start, end, endPtr); } -static enum XML_Error PTRCALL +static enum XML_Error externalEntityInitProcessor2(XML_Parser parser, const char *start, const char *end, const char **endPtr) { const char *next = start; /* XmlContentTok doesn't always set the last arg */ @@ -3237,7 +3214,7 @@ externalEntityInitProcessor2(XML_Parser parser, const char *start, return externalEntityInitProcessor3(parser, start, end, endPtr); } -static enum XML_Error PTRCALL +static enum XML_Error externalEntityInitProcessor3(XML_Parser parser, const char *start, const char *end, const char **endPtr) { int tok; @@ -3289,7 +3266,7 @@ externalEntityInitProcessor3(XML_Parser parser, const char *start, return externalEntityContentProcessor(parser, start, end, endPtr); } -static enum XML_Error PTRCALL +static enum XML_Error externalEntityContentProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result @@ -4551,6 +4528,7 @@ addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, /* Detect and prevent integer overflow */ if (len > SIZE_MAX - EXPAND_SPARE || len + EXPAND_SPARE > SIZE_MAX / sizeof(XML_Char)) { + FREE(parser, b); return XML_ERROR_NO_MEMORY; } @@ -4588,7 +4566,7 @@ addBinding(XML_Parser parser, PREFIX *prefix, const ATTRIBUTE_ID *attId, /* The idea here is to avoid using stack for each CDATA section when the whole file is parsed with one call. */ -static enum XML_Error PTRCALL +static enum XML_Error cdataSectionProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doCdataSection( @@ -4754,7 +4732,7 @@ doCdataSection(XML_Parser parser, const ENCODING *enc, const char **startPtr, /* The idea here is to avoid using stack for each IGNORE section when the whole file is parsed with one call. */ -static enum XML_Error PTRCALL +static enum XML_Error ignoreSectionProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result @@ -5024,7 +5002,7 @@ handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName) { return XML_ERROR_UNKNOWN_ENCODING; } -static enum XML_Error PTRCALL +static enum XML_Error prologInitProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { enum XML_Error result = initializeEncoding(parser); @@ -5036,7 +5014,7 @@ prologInitProcessor(XML_Parser parser, const char *s, const char *end, #ifdef XML_DTD -static enum XML_Error PTRCALL +static enum XML_Error externalParEntInitProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { enum XML_Error result = initializeEncoding(parser); @@ -5045,7 +5023,7 @@ externalParEntInitProcessor(XML_Parser parser, const char *s, const char *end, /* we know now that XML_Parse(Buffer) has been called, so we consider the external parameter entity read */ - parser->m_dtd->paramEntityRead = XML_TRUE; + parser->m_dtd->paramEntityRead = true; if (parser->m_prologState.inEntityValue) { parser->m_processor = entityValueInitProcessor; @@ -5056,7 +5034,7 @@ externalParEntInitProcessor(XML_Parser parser, const char *s, const char *end, } } -static enum XML_Error PTRCALL +static enum XML_Error entityValueInitProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { int tok; @@ -5140,7 +5118,7 @@ entityValueInitProcessor(XML_Parser parser, const char *s, const char *end, } } -static enum XML_Error PTRCALL +static enum XML_Error externalParEntProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { const char *next = s; @@ -5186,7 +5164,7 @@ externalParEntProcessor(XML_Parser parser, const char *s, const char *end, XML_ACCOUNT_DIRECT); } -static enum XML_Error PTRCALL +static enum XML_Error entityValueProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { const char *start = s; @@ -5233,7 +5211,7 @@ entityValueProcessor(XML_Parser parser, const char *s, const char *end, #endif /* XML_DTD */ -static enum XML_Error PTRCALL +static enum XML_Error prologProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { const char *next = s; @@ -5479,7 +5457,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, } if (parser->m_useForeignDTD) entity->base = parser->m_curBase; - dtd->paramEntityRead = XML_FALSE; + dtd->paramEntityRead = false; beforeHandler(parser); const int status = parser->m_externalEntityRefHandler( parser->m_externalEntityRefHandlerArg, 0, entity->base, @@ -5529,7 +5507,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, if (! entity) return XML_ERROR_NO_MEMORY; entity->base = parser->m_curBase; - dtd->paramEntityRead = XML_FALSE; + dtd->paramEntityRead = false; beforeHandler(parser); const int status = parser->m_externalEntityRefHandler( parser->m_externalEntityRefHandlerArg, 0, entity->base, @@ -5872,7 +5850,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, } else { poolFinish(&dtd->pool); parser->m_declEntity->publicId = NULL; - parser->m_declEntity->is_param = XML_FALSE; + parser->m_declEntity->is_param = false; /* if we have a parent parser or are reading an internal parameter entity, then the entity declaration is not considered "internal" */ @@ -5902,7 +5880,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, } else { poolFinish(&dtd->pool); parser->m_declEntity->publicId = NULL; - parser->m_declEntity->is_param = XML_TRUE; + parser->m_declEntity->is_param = true; /* if we have a parent parser or are reading an internal parameter entity, then the entity declaration is not considered "internal" */ @@ -6137,8 +6115,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, return XML_ERROR_RECURSIVE_ENTITY_REF; if (entity->textPtr) { enum XML_Error result; - XML_Bool betweenDecl - = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE); + bool betweenDecl = (role == XML_ROLE_PARAM_ENTITY_REF); result = processEntity(parser, entity, betweenDecl, ENTITY_INTERNAL); if (result != XML_ERROR_NONE) return result; @@ -6146,7 +6123,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, break; } if (parser->m_externalEntityRefHandler) { - dtd->paramEntityRead = XML_FALSE; + dtd->paramEntityRead = false; entity->open = true; entityTrackingOnOpen(parser, entity, __LINE__); beforeHandler(parser); @@ -6190,7 +6167,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, return XML_ERROR_NO_MEMORY; dtd->scaffLevel = 0; dtd->scaffCount = 0; - dtd->in_eldecl = XML_TRUE; + dtd->in_eldecl = true; handleDefault = XML_FALSE; } break; @@ -6219,7 +6196,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, afterHandler(parser); handleDefault = XML_FALSE; } - dtd->in_eldecl = XML_FALSE; + dtd->in_eldecl = false; } break; @@ -6301,7 +6278,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, parser->m_handlerArg, parser->m_declElementType->name, model); afterHandler(parser); } - dtd->in_eldecl = XML_FALSE; + dtd->in_eldecl = false; dtd->contentStringLen = 0; } } @@ -6370,7 +6347,7 @@ doProlog(XML_Parser parser, const ENCODING *enc, const char *s, const char *end, /* not reached */ } -static enum XML_Error PTRCALL +static enum XML_Error epilogProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { parser->m_processor = epilogProcessor; @@ -6449,7 +6426,7 @@ epilogProcessor(XML_Parser parser, const char *s, const char *end, } static enum XML_Error -processEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl, +processEntity(XML_Parser parser, ENTITY *entity, bool betweenDecl, enum EntityType type) { OPEN_INTERNAL_ENTITY *openEntity, **openEntityList; OPEN_INTERNAL_ENTITY **const freeEntityList = &parser->m_freeEntities; @@ -6485,7 +6462,7 @@ processEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl, return XML_ERROR_NO_MEMORY; } entity->open = true; - entity->hasMore = XML_TRUE; + entity->hasMore = true; #if XML_GE == 1 entityTrackingOnOpen(parser, entity, __LINE__); #endif @@ -6507,7 +6484,7 @@ processEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl, return XML_ERROR_NONE; } -static enum XML_Error PTRCALL +static enum XML_Error internalEntityProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { UNUSED_P(s); @@ -6557,7 +6534,7 @@ internalEntityProcessor(XML_Parser parser, const char *s, const char *end, // Entity is complete. We cannot close it here since we need to first // process its possible inner entities (which are added to the // m_openInternalEntities during doProlog or doContent calls above) - entity->hasMore = XML_FALSE; + entity->hasMore = false; if (! entity->is_param && (openEntity->startTagLevel != parser->m_tagLevel)) { return XML_ERROR_ASYNC_ENTITY; @@ -6589,7 +6566,7 @@ internalEntityProcessor(XML_Parser parser, const char *s, const char *end, return XML_ERROR_NONE; } -static enum XML_Error PTRCALL +static enum XML_Error errorProcessor(XML_Parser parser, const char *s, const char *end, const char **nextPtr) { UNUSED_P(s); @@ -6640,7 +6617,7 @@ storeAttributeValue(XML_Parser parser, const ENCODING *enc, XML_Bool isCdata, // Entity is complete. We cannot close it here since we need to first // process its possible inner entities (which are added to the // m_openAttributeEntities during appendAttributeValue) - entity->hasMore = XML_FALSE; + entity->hasMore = false; continue; } // End of entity processing, "if" block skips the rest @@ -6948,7 +6925,7 @@ storeEntityValue(XML_Parser parser, const ENCODING *enc, } if (entity->systemId) { if (parser->m_externalEntityRefHandler) { - dtd->paramEntityRead = XML_FALSE; + dtd->paramEntityRead = false; entity->open = true; entityTrackingOnOpen(parser, entity, __LINE__); beforeHandler(parser); @@ -7100,7 +7077,7 @@ callStoreEntityValue(XML_Parser parser, const ENCODING *enc, // Entity is complete. We cannot close it here since we need to first // process its possible inner entities (which are added to the // m_openValueEntities during storeEntityValue) - entity->hasMore = XML_FALSE; + entity->hasMore = false; continue; } // End of entity processing, "if" block skips the rest @@ -7162,7 +7139,7 @@ storeSelfEntityValue(XML_Parser parser, ENTITY *entity) { #endif /* XML_GE == 0 */ -static void FASTCALL +static void normalizeLines(XML_Char *s) { XML_Char *p; for (;; s++) { @@ -7328,7 +7305,7 @@ defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *attId, XML_Bool isCdata, att->value = value; att->isCdata = isCdata; if (! isCdata) - attId->maybeTokenized = XML_TRUE; + attId->maybeTokenized = true; NAME_AND_DEFAULT_ATTRIBUTE *const nameAndDefaultAttribute = (NAME_AND_DEFAULT_ATTRIBUTE *)lookup( @@ -7413,7 +7390,7 @@ getAttributeId(XML_Parser parser, const ENCODING *enc, const char *start, else id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6, sizeof(PREFIX)); - id->xmlns = XML_TRUE; + id->xmlns = true; } else { int i; for (i = 0; name[i]; i++) { @@ -7603,7 +7580,7 @@ setContext(XML_Parser parser, const XML_Char *context) { return XML_TRUE; } -static void FASTCALL +static void normalizePublicId(XML_Char *publicId) { XML_Char *p = publicId; XML_Char *s; @@ -7636,13 +7613,13 @@ dtdCreate(XML_Parser parser) { hashTableInit(&(p->attributeIds), parser); hashTableInit(&(p->prefixes), parser); #ifdef XML_DTD - p->paramEntityRead = XML_FALSE; + p->paramEntityRead = false; hashTableInit(&(p->paramEntities), parser); #endif /* XML_DTD */ p->defaultPrefix.name = NULL; p->defaultPrefix.binding = NULL; - p->in_eldecl = XML_FALSE; + p->in_eldecl = false; p->scaffIndex = NULL; p->scaffIndexSize = 0; p->scaffold = NULL; @@ -7670,7 +7647,7 @@ dtdReset(DTD *p, XML_Parser parser) { } hashTableClear(&(p->generalEntities)); #ifdef XML_DTD - p->paramEntityRead = XML_FALSE; + p->paramEntityRead = false; hashTableClear(&(p->paramEntities)); #endif /* XML_DTD */ hashTableClear(&(p->elementTypes)); @@ -7681,7 +7658,7 @@ dtdReset(DTD *p, XML_Parser parser) { p->defaultPrefix.name = NULL; p->defaultPrefix.binding = NULL; - p->in_eldecl = XML_FALSE; + p->in_eldecl = false; FREE(parser, p->scaffIndex); p->scaffIndex = NULL; @@ -7949,7 +7926,7 @@ copyEntityTable(XML_Parser oldParser, HASH_TABLE *newTable, // Compares two strings `s1` and `s2` whereas: // - `s2` is zero-terminated but // - `s1` is made up of exactly (not just up to) `s1len` non-zero characters. -static XML_Bool FASTCALL +XML_NONTESTING_STATIC XML_Bool keyeq(KEY s1, size_t s1len, KEY s2) { #ifdef XML_UNICODE # ifdef XML_UNICODE_WCHAR_T @@ -7966,7 +7943,7 @@ keyeq(KEY s1, size_t s1len, KEY s2) { #endif } -static size_t +XML_NONTESTING_STATIC size_t keylen(KEY s) { return xcslen(s); } @@ -7979,7 +7956,7 @@ copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) { *key = rootParser->m_hash_secret_salt_128; } -static unsigned long FASTCALL +static unsigned long hash(XML_Parser parser, KEY s, size_t keyLen) { struct siphash state; struct sipkey key; @@ -8009,7 +7986,7 @@ hash(XML_Parser parser, KEY s, size_t keyLen) { // read-write mode does, because keys can be re-hashed later and the // hash table does not store key length information. // -static NAMED * +XML_NONTESTING_STATIC NAMED * lookupWithLength(XML_Parser parser, HASH_TABLE *table, KEY name, size_t nameLen, size_t createSize) { size_t i; @@ -8116,12 +8093,12 @@ lookupWithLength(XML_Parser parser, HASH_TABLE *table, KEY name, size_t nameLen, // be used to tell cases "existed and found" and "newly inserted" apart // with the structure returned. // -static NAMED * +XML_NONTESTING_STATIC NAMED * lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) { return lookupWithLength(parser, table, name, keylen(name), createSize); } -static void FASTCALL +XML_NONTESTING_STATIC void hashTableClear(HASH_TABLE *table) { size_t i; for (i = 0; i < table->size; i++) { @@ -8131,7 +8108,7 @@ hashTableClear(HASH_TABLE *table) { table->used = 0; } -static void FASTCALL +XML_NONTESTING_STATIC void hashTableDestroy(HASH_TABLE *table) { size_t i; for (i = 0; i < table->size; i++) @@ -8139,7 +8116,7 @@ hashTableDestroy(HASH_TABLE *table) { FREE(table->parser, table->v); } -static void FASTCALL +XML_NONTESTING_STATIC void hashTableInit(HASH_TABLE *p, XML_Parser parser) { p->power = 0; p->size = 0; @@ -8148,13 +8125,13 @@ hashTableInit(HASH_TABLE *p, XML_Parser parser) { p->parser = parser; } -static void FASTCALL +XML_NONTESTING_STATIC void hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) { iter->p = table->v; iter->end = iter->p ? iter->p + table->size : NULL; } -static NAMED *FASTCALL +XML_NONTESTING_STATIC NAMED * hashTableIterNext(HASH_TABLE_ITER *iter) { while (iter->p != iter->end) { NAMED *tem = *(iter->p)++; @@ -8164,7 +8141,7 @@ hashTableIterNext(HASH_TABLE_ITER *iter) { return NULL; } -static void FASTCALL +static void poolInit(STRING_POOL *pool, XML_Parser parser) { pool->blocks = NULL; pool->freeBlocks = NULL; @@ -8174,7 +8151,7 @@ poolInit(STRING_POOL *pool, XML_Parser parser) { pool->parser = parser; } -static void FASTCALL +static void poolClear(STRING_POOL *pool) { if (! pool->freeBlocks) pool->freeBlocks = pool->blocks; @@ -8193,7 +8170,7 @@ poolClear(STRING_POOL *pool) { pool->end = NULL; } -static void FASTCALL +static void poolDestroy(STRING_POOL *pool) { BLOCK *p = pool->blocks; while (p) { @@ -8226,7 +8203,7 @@ poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr, return pool->start; } -static const XML_Char *FASTCALL +static const XML_Char * poolCopyString(STRING_POOL *pool, const XML_Char *s) { if (! poolAppendChars(pool, s, xcslen(s) + /*null terminator*/ 1)) return NULL; @@ -8237,7 +8214,7 @@ poolCopyString(STRING_POOL *pool, const XML_Char *s) { // A version of `poolCopyString` that does not call `poolFinish` // and reverts any partial advancement upon failure. -static const XML_Char *FASTCALL +static const XML_Char * poolCopyStringNoFinish(STRING_POOL *pool, const XML_Char *s) { const XML_Char *const original = s; do { @@ -8275,7 +8252,7 @@ poolCopyStringN(STRING_POOL *pool, const XML_Char *s, int n) { return s; } -static const XML_Char *FASTCALL +static const XML_Char * poolAppendString(STRING_POOL *pool, const XML_Char *s) { if (! poolAppendChars(pool, s, xcslen(s))) return NULL; @@ -8320,7 +8297,7 @@ poolBytesToAllocateFor(int blockSize) { } } -static XML_Bool FASTCALL +static XML_Bool poolGrow(STRING_POOL *pool) { if (pool->freeBlocks) { if (pool->start == NULL) { @@ -8425,7 +8402,7 @@ poolGrow(STRING_POOL *pool) { return XML_TRUE; } -static bool FASTCALL +static bool poolGrowUntil(STRING_POOL *pool, size_t needed) { for (;;) { const size_t available = pool->end - pool->ptr; @@ -8438,7 +8415,7 @@ poolGrowUntil(STRING_POOL *pool, size_t needed) { } } -static int FASTCALL +static int nextScaffoldPart(XML_Parser parser) { DTD *const dtd = parser->m_dtd; /* save one level of indirection */ CONTENT_SCAFFOLD *me; diff --git a/Modules/expat/xmlrole.c b/Modules/expat/xmlrole.c index 8f6bedda71652d..dbf4a2d1b8f708 100644 --- a/Modules/expat/xmlrole.c +++ b/Modules/expat/xmlrole.c @@ -12,7 +12,7 @@ Copyright (c) 2002-2006 Karl Waclawek Copyright (c) 2002-2003 Fred L. Drake, Jr. Copyright (c) 2005-2009 Steven Solie - Copyright (c) 2016-2023 Sebastian Pipping + Copyright (c) 2016-2026 Sebastian Pipping Copyright (c) 2017 Rhodri James Copyright (c) 2019 David Loffredo Copyright (c) 2021 Donghee Na @@ -121,9 +121,8 @@ static const char KW_SYSTEM[] # define setTopLevel(state) ((state)->handler = internalSubset) #endif /* not XML_DTD */ -typedef int PTRCALL PROLOG_HANDLER(PROLOG_STATE *state, int tok, - const char *ptr, const char *end, - const ENCODING *enc); +typedef int PROLOG_HANDLER(PROLOG_STATE *state, int tok, const char *ptr, + const char *end, const ENCODING *enc); static PROLOG_HANDLER prolog0, prolog1, prolog2, doctype0, doctype1, doctype2, doctype3, doctype4, doctype5, internalSubset, entity0, entity1, entity2, @@ -137,9 +136,9 @@ static PROLOG_HANDLER prolog0, prolog1, prolog2, doctype0, doctype1, doctype2, #endif /* XML_DTD */ declClose, error; -static int FASTCALL common(PROLOG_STATE *state, int tok); +static int common(PROLOG_STATE *state, int tok); -static int PTRCALL +static int prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -170,7 +169,7 @@ prolog0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -202,7 +201,7 @@ prolog1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -222,7 +221,7 @@ prolog2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int doctype0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -239,7 +238,7 @@ doctype0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int doctype1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -265,7 +264,7 @@ doctype1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int doctype2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -281,7 +280,7 @@ doctype2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int doctype3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -297,7 +296,7 @@ doctype3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int doctype4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -316,7 +315,7 @@ doctype4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int doctype5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -332,7 +331,7 @@ doctype5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int internalSubset(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -377,7 +376,7 @@ internalSubset(PROLOG_STATE *state, int tok, const char *ptr, const char *end, #ifdef XML_DTD -static int PTRCALL +static int externalSubset0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { state->handler = externalSubset1; @@ -386,7 +385,7 @@ externalSubset0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return externalSubset1(state, tok, ptr, end, enc); } -static int PTRCALL +static int externalSubset1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -414,7 +413,7 @@ externalSubset1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, #endif /* XML_DTD */ -static int PTRCALL +static int entity0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -433,7 +432,7 @@ entity0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -449,7 +448,7 @@ entity1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -473,7 +472,7 @@ entity2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -489,7 +488,7 @@ entity3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -505,7 +504,7 @@ entity4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -524,7 +523,7 @@ entity5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -541,7 +540,7 @@ entity6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -565,7 +564,7 @@ entity7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -581,7 +580,7 @@ entity8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -597,7 +596,7 @@ entity9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int entity10(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -613,7 +612,7 @@ entity10(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int notation0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -629,7 +628,7 @@ notation0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int notation1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -649,7 +648,7 @@ notation1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int notation2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -665,7 +664,7 @@ notation2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int notation3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -682,7 +681,7 @@ notation3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int notation4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -702,7 +701,7 @@ notation4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -719,7 +718,7 @@ attlist0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -739,7 +738,7 @@ attlist1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -769,7 +768,7 @@ attlist2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -787,7 +786,7 @@ attlist3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -806,7 +805,7 @@ attlist4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -822,7 +821,7 @@ attlist5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -838,7 +837,7 @@ attlist6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -858,7 +857,7 @@ attlist7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, } /* default value */ -static int PTRCALL +static int attlist8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -888,7 +887,7 @@ attlist8(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int attlist9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -904,7 +903,7 @@ attlist9(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -921,7 +920,7 @@ element0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -947,7 +946,7 @@ element1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -981,7 +980,7 @@ element2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1005,7 +1004,7 @@ element3(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1022,7 +1021,7 @@ element4(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1042,7 +1041,7 @@ element5(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1071,7 +1070,7 @@ element6(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int element7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1120,7 +1119,7 @@ element7(PROLOG_STATE *state, int tok, const char *ptr, const char *end, #ifdef XML_DTD -static int PTRCALL +static int condSect0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { switch (tok) { @@ -1140,7 +1139,7 @@ condSect0(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int condSect1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1157,7 +1156,7 @@ condSect1(PROLOG_STATE *state, int tok, const char *ptr, const char *end, return common(state, tok); } -static int PTRCALL +static int condSect2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1175,7 +1174,7 @@ condSect2(PROLOG_STATE *state, int tok, const char *ptr, const char *end, #endif /* XML_DTD */ -static int PTRCALL +static int declClose(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(ptr); @@ -1211,7 +1210,7 @@ declClose(PROLOG_STATE *state, int tok, const char *ptr, const char *end, * * LCOV_EXCL_START */ -static int PTRCALL +static int error(PROLOG_STATE *state, int tok, const char *ptr, const char *end, const ENCODING *enc) { UNUSED_P(state); @@ -1223,7 +1222,7 @@ error(PROLOG_STATE *state, int tok, const char *ptr, const char *end, } /* LCOV_EXCL_STOP */ -static int FASTCALL +static int common(PROLOG_STATE *state, int tok) { #ifdef XML_DTD if (! state->documentEntity && tok == XML_TOK_PARAM_ENTITY_REF) diff --git a/Modules/expat/xmlrole.h b/Modules/expat/xmlrole.h index 903a6951f434e2..f4aba4079f5cdf 100644 --- a/Modules/expat/xmlrole.h +++ b/Modules/expat/xmlrole.h @@ -10,7 +10,7 @@ Copyright (c) 2000 Clark Cooper Copyright (c) 2002 Karl Waclawek Copyright (c) 2002 Fred L. Drake, Jr. - Copyright (c) 2017-2025 Sebastian Pipping + Copyright (c) 2017-2026 Sebastian Pipping Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -40,10 +40,6 @@ # include "xmltok.h" -# ifdef __cplusplus -extern "C" { -# endif - enum { XML_ROLE_ERROR = -1, XML_ROLE_NONE = 0, @@ -112,8 +108,8 @@ enum { }; typedef struct prolog_state { - int(PTRCALL *handler)(struct prolog_state *state, int tok, const char *ptr, - const char *end, const ENCODING *enc); + int (*handler)(struct prolog_state *state, int tok, const char *ptr, + const char *end, const ENCODING *enc); unsigned level; int role_none; # ifdef XML_DTD @@ -131,8 +127,4 @@ void XmlPrologStateInitExternalEntity(PROLOG_STATE *state); # define XmlTokenRole(state, tok, ptr, end, enc) \ (((state)->handler)(state, tok, ptr, end, enc)) -# ifdef __cplusplus -} -# endif - #endif /* not XmlRole_INCLUDED */ diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c index d66af6045f07ac..a3bf5e0e95b0e0 100644 --- a/Modules/expat/xmltok.c +++ b/Modules/expat/xmltok.c @@ -27,6 +27,7 @@ Copyright (c) 2025 Alfonso Gregory Copyright (c) 2026 Nick Begg Copyright (c) 2026 Kartik Kenchi + Copyright (c) 2026 Afonso Januário Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -136,20 +137,20 @@ : ((p)[1] & 0x80) == 0 \ || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0))) -static int PTRFASTCALL +static int isNever(const ENCODING *enc, const char *p) { UNUSED_P(enc); UNUSED_P(p); return 0; } -static int PTRFASTCALL +static int utf8_isName2(const ENCODING *enc, const char *p) { UNUSED_P(enc); return UTF8_GET_NAMING2(namePages, (const unsigned char *)p); } -static int PTRFASTCALL +static int utf8_isName3(const ENCODING *enc, const char *p) { UNUSED_P(enc); return UTF8_GET_NAMING3(namePages, (const unsigned char *)p); @@ -157,13 +158,13 @@ utf8_isName3(const ENCODING *enc, const char *p) { #define utf8_isName4 isNever -static int PTRFASTCALL +static int utf8_isNmstrt2(const ENCODING *enc, const char *p) { UNUSED_P(enc); return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p); } -static int PTRFASTCALL +static int utf8_isNmstrt3(const ENCODING *enc, const char *p) { UNUSED_P(enc); return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p); @@ -171,19 +172,19 @@ utf8_isNmstrt3(const ENCODING *enc, const char *p) { #define utf8_isNmstrt4 isNever -static int PTRFASTCALL +static int utf8_isInvalid2(const ENCODING *enc, const char *p) { UNUSED_P(enc); return UTF8_INVALID2((const unsigned char *)p); } -static int PTRFASTCALL +static int utf8_isInvalid3(const ENCODING *enc, const char *p) { UNUSED_P(enc); return UTF8_INVALID3((const unsigned char *)p); } -static int PTRFASTCALL +static int utf8_isInvalid4(const ENCODING *enc, const char *p) { UNUSED_P(enc); return UTF8_INVALID4((const unsigned char *)p); @@ -193,21 +194,21 @@ struct normal_encoding { ENCODING enc; unsigned char type[256]; #ifdef XML_MIN_SIZE - int(PTRFASTCALL *byteType)(const ENCODING *, const char *); - int(PTRFASTCALL *isNameMin)(const ENCODING *, const char *); - int(PTRFASTCALL *isNmstrtMin)(const ENCODING *, const char *); - int(PTRFASTCALL *byteToAscii)(const ENCODING *, const char *); - int(PTRCALL *charMatches)(const ENCODING *, const char *, int); + int (*byteType)(const ENCODING *, const char *); + int (*isNameMin)(const ENCODING *, const char *); + int (*isNmstrtMin)(const ENCODING *, const char *); + int (*byteToAscii)(const ENCODING *, const char *); + int (*charMatches)(const ENCODING *, const char *, int); #endif /* XML_MIN_SIZE */ - int(PTRFASTCALL *isName2)(const ENCODING *, const char *); - int(PTRFASTCALL *isName3)(const ENCODING *, const char *); - int(PTRFASTCALL *isName4)(const ENCODING *, const char *); - int(PTRFASTCALL *isNmstrt2)(const ENCODING *, const char *); - int(PTRFASTCALL *isNmstrt3)(const ENCODING *, const char *); - int(PTRFASTCALL *isNmstrt4)(const ENCODING *, const char *); - int(PTRFASTCALL *isInvalid2)(const ENCODING *, const char *); - int(PTRFASTCALL *isInvalid3)(const ENCODING *, const char *); - int(PTRFASTCALL *isInvalid4)(const ENCODING *, const char *); + int (*isName2)(const ENCODING *, const char *); + int (*isName3)(const ENCODING *, const char *); + int (*isName4)(const ENCODING *, const char *); + int (*isNmstrt2)(const ENCODING *, const char *); + int (*isNmstrt3)(const ENCODING *, const char *); + int (*isNmstrt4)(const ENCODING *, const char *); + int (*isInvalid2)(const ENCODING *, const char *); + int (*isInvalid3)(const ENCODING *, const char *); + int (*isInvalid4)(const ENCODING *, const char *); }; #define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc)) @@ -232,7 +233,20 @@ struct normal_encoding { /* isNmstrt2 */ NULL, /* isNmstrt3 */ NULL, /* isNmstrt4 */ NULL, \ /* isInvalid2 */ NULL, /* isInvalid3 */ NULL, /* isInvalid4 */ NULL -static int FASTCALL checkCharRefNumber(int result); +/* Like NULL_VTABLE but with a real isInvalid4 so the UTF-16 encodings reject a + high surrogate that is not followed by a low surrogate. Only needed for the + XML_MIN_SIZE build, where the shared tokenizer dispatches through the vtable; + the regular build inlines the same check via IS_INVALID_CHAR. */ +#ifdef XML_MIN_SIZE +# define UTF16_NULL_VTABLE(E) \ + /* isName2 */ NULL, /* isName3 */ NULL, /* isName4 */ NULL, \ + /* isNmstrt2 */ NULL, /* isNmstrt3 */ NULL, /* isNmstrt4 */ NULL, \ + /* isInvalid2 */ NULL, /* isInvalid3 */ NULL, E##isInvalid4 +#else +# define UTF16_NULL_VTABLE(E) NULL_VTABLE +#endif + +static int checkCharRefNumber(int result); #include "xmltok_impl.h" #include "ascii.h" @@ -253,7 +267,7 @@ static int FASTCALL checkCharRefNumber(int result); (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)]) #ifdef XML_MIN_SIZE -static int PTRFASTCALL +static int sb_byteType(const ENCODING *enc, const char *p) { return SB_BYTE_TYPE(enc, p); } @@ -264,7 +278,7 @@ sb_byteType(const ENCODING *enc, const char *p) { #ifdef XML_MIN_SIZE # define BYTE_TO_ASCII(enc, p) (AS_NORMAL_ENCODING(enc)->byteToAscii(enc, p)) -static int PTRFASTCALL +static int sb_byteToAscii(const ENCODING *enc, const char *p) { UNUSED_P(enc); return *p; @@ -297,7 +311,7 @@ sb_byteToAscii(const ENCODING *enc, const char *p) { #ifdef XML_MIN_SIZE # define CHAR_MATCHES(enc, p, c) \ (AS_NORMAL_ENCODING(enc)->charMatches(enc, p, c)) -static int PTRCALL +static int sb_charMatches(const ENCODING *enc, const char *p, int c) { UNUSED_P(enc); return *p == c; @@ -368,7 +382,7 @@ _INTERNAL_trim_to_complete_utf8_characters(const char *from, *fromLimRef = fromLim; } -static enum XML_Convert_Result PTRCALL +static enum XML_Convert_Result utf8_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { bool input_incomplete = false; @@ -407,7 +421,7 @@ utf8_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, return XML_CONVERT_COMPLETED; } -static enum XML_Convert_Result PTRCALL +static enum XML_Convert_Result utf8_toUtf16(const ENCODING *enc, const char **fromP, const char *fromLim, unsigned short **toP, const unsigned short *toLim) { enum XML_Convert_Result res = XML_CONVERT_COMPLETED; @@ -505,7 +519,7 @@ static const struct normal_encoding internal_utf8_encoding }, STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_)}; -static enum XML_Convert_Result PTRCALL +static enum XML_Convert_Result latin1_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { UNUSED_P(enc); @@ -528,7 +542,7 @@ latin1_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, } } -static enum XML_Convert_Result PTRCALL +static enum XML_Convert_Result latin1_toUtf16(const ENCODING *enc, const char **fromP, const char *fromLim, unsigned short **toP, const unsigned short *toLim) { UNUSED_P(enc); @@ -563,7 +577,7 @@ static const struct normal_encoding latin1_encoding }, STANDARD_VTABLE(sb_) NULL_VTABLE}; -static enum XML_Convert_Result PTRCALL +static enum XML_Convert_Result ascii_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { UNUSED_P(enc); @@ -598,7 +612,7 @@ static const struct normal_encoding ascii_encoding }, STANDARD_VTABLE(sb_) NULL_VTABLE}; -static int PTRFASTCALL +static int unicode_byte_type(char hi, char lo) { switch ((unsigned char)hi) { /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */ @@ -625,7 +639,7 @@ unicode_byte_type(char hi, char lo) { } #define DEFINE_UTF16_TO_UTF8(E) \ - static enum XML_Convert_Result PTRCALL E##toUtf8( \ + static enum XML_Convert_Result E##toUtf8( \ const ENCODING *enc, const char **fromP, const char *fromLim, \ char **toP, const char *toLim) { \ const char *from = *fromP; \ @@ -702,7 +716,7 @@ unicode_byte_type(char hi, char lo) { } #define DEFINE_UTF16_TO_UTF16(E) \ - static enum XML_Convert_Result PTRCALL E##toUtf16( \ + static enum XML_Convert_Result E##toUtf16( \ const ENCODING *enc, const char **fromP, const char *fromLim, \ unsigned short **toP, const unsigned short *toLim) { \ enum XML_Convert_Result res = XML_CONVERT_COMPLETED; \ @@ -749,38 +763,49 @@ DEFINE_UTF16_TO_UTF16(big2_) UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0]) #define LITTLE2_IS_NMSTRT_CHAR_MINBPC(p) \ UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0]) +/* A 4-byte UTF-16 character is a surrogate pair; byteType only reports BT_LEAD4 + for a high surrogate, so the pair is invalid unless the second unit is a low + surrogate (U+DC00..U+DFFF, i.e. high byte 0xDC..0xDF). */ +#define LITTLE2_IS_INVALID_CHAR(p, n) \ + ((n) == 4 && ((unsigned char)(p)[3] & 0xFC) != 0xDC) #ifdef XML_MIN_SIZE -static int PTRFASTCALL +static int little2_byteType(const ENCODING *enc, const char *p) { return LITTLE2_BYTE_TYPE(enc, p); } -static int PTRFASTCALL +static int little2_byteToAscii(const ENCODING *enc, const char *p) { UNUSED_P(enc); return LITTLE2_BYTE_TO_ASCII(p); } -static int PTRCALL +static int little2_charMatches(const ENCODING *enc, const char *p, int c) { UNUSED_P(enc); return LITTLE2_CHAR_MATCHES(p, c); } -static int PTRFASTCALL +static int little2_isNameMin(const ENCODING *enc, const char *p) { UNUSED_P(enc); return LITTLE2_IS_NAME_CHAR_MINBPC(p); } -static int PTRFASTCALL +static int little2_isNmstrtMin(const ENCODING *enc, const char *p) { UNUSED_P(enc); return LITTLE2_IS_NMSTRT_CHAR_MINBPC(p); } +static int +little2_isInvalid4(const ENCODING *enc, const char *p) { + UNUSED_P(enc); + return LITTLE2_IS_INVALID_CHAR(p, 4); +} + # undef VTABLE # define VTABLE VTABLE1, little2_toUtf8, little2_toUtf16 @@ -797,6 +822,7 @@ little2_isNmstrtMin(const ENCODING *enc, const char *p) { # define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p) # define IS_NMSTRT_CHAR(enc, p, n) (0) # define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p) +# define IS_INVALID_CHAR(enc, p, n) LITTLE2_IS_INVALID_CHAR(p, n) # define XML_TOK_IMPL_C # include "xmltok_impl.c" @@ -828,7 +854,7 @@ static const struct normal_encoding little2_encoding_ns # include "asciitab.h" # include "latin1tab.h" }, - STANDARD_VTABLE(little2_) NULL_VTABLE}; + STANDARD_VTABLE(little2_) UTF16_NULL_VTABLE(little2_)}; #endif @@ -846,7 +872,7 @@ static const struct normal_encoding little2_encoding #undef BT_COLON #include "latin1tab.h" }, - STANDARD_VTABLE(little2_) NULL_VTABLE}; + STANDARD_VTABLE(little2_) UTF16_NULL_VTABLE(little2_)}; #if BYTEORDER != 4321 @@ -858,7 +884,7 @@ static const struct normal_encoding internal_little2_encoding_ns # include "iasciitab.h" # include "latin1tab.h" }, - STANDARD_VTABLE(little2_) NULL_VTABLE}; + STANDARD_VTABLE(little2_) UTF16_NULL_VTABLE(little2_)}; # endif @@ -870,7 +896,7 @@ static const struct normal_encoding internal_little2_encoding # undef BT_COLON # include "latin1tab.h" }, - STANDARD_VTABLE(little2_) NULL_VTABLE}; + STANDARD_VTABLE(little2_) UTF16_NULL_VTABLE(little2_)}; #endif @@ -882,38 +908,49 @@ static const struct normal_encoding internal_little2_encoding UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1]) #define BIG2_IS_NMSTRT_CHAR_MINBPC(p) \ UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1]) +/* A 4-byte UTF-16 character is a surrogate pair; byteType only reports BT_LEAD4 + for a high surrogate, so the pair is invalid unless the second unit is a low + surrogate (U+DC00..U+DFFF, i.e. high byte 0xDC..0xDF). */ +#define BIG2_IS_INVALID_CHAR(p, n) \ + ((n) == 4 && ((unsigned char)(p)[2] & 0xFC) != 0xDC) #ifdef XML_MIN_SIZE -static int PTRFASTCALL +static int big2_byteType(const ENCODING *enc, const char *p) { return BIG2_BYTE_TYPE(enc, p); } -static int PTRFASTCALL +static int big2_byteToAscii(const ENCODING *enc, const char *p) { UNUSED_P(enc); return BIG2_BYTE_TO_ASCII(p); } -static int PTRCALL +static int big2_charMatches(const ENCODING *enc, const char *p, int c) { UNUSED_P(enc); return BIG2_CHAR_MATCHES(p, c); } -static int PTRFASTCALL +static int big2_isNameMin(const ENCODING *enc, const char *p) { UNUSED_P(enc); return BIG2_IS_NAME_CHAR_MINBPC(p); } -static int PTRFASTCALL +static int big2_isNmstrtMin(const ENCODING *enc, const char *p) { UNUSED_P(enc); return BIG2_IS_NMSTRT_CHAR_MINBPC(p); } +static int +big2_isInvalid4(const ENCODING *enc, const char *p) { + UNUSED_P(enc); + return BIG2_IS_INVALID_CHAR(p, 4); +} + # undef VTABLE # define VTABLE VTABLE1, big2_toUtf8, big2_toUtf16 @@ -930,6 +967,7 @@ big2_isNmstrtMin(const ENCODING *enc, const char *p) { # define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p) # define IS_NMSTRT_CHAR(enc, p, n) (0) # define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p) +# define IS_INVALID_CHAR(enc, p, n) BIG2_IS_INVALID_CHAR(p, n) # define XML_TOK_IMPL_C # include "xmltok_impl.c" @@ -961,7 +999,7 @@ static const struct normal_encoding big2_encoding_ns # include "asciitab.h" # include "latin1tab.h" }, - STANDARD_VTABLE(big2_) NULL_VTABLE}; + STANDARD_VTABLE(big2_) UTF16_NULL_VTABLE(big2_)}; #endif @@ -979,7 +1017,7 @@ static const struct normal_encoding big2_encoding #undef BT_COLON #include "latin1tab.h" }, - STANDARD_VTABLE(big2_) NULL_VTABLE}; + STANDARD_VTABLE(big2_) UTF16_NULL_VTABLE(big2_)}; #if BYTEORDER != 1234 @@ -991,7 +1029,7 @@ static const struct normal_encoding internal_big2_encoding_ns # include "iasciitab.h" # include "latin1tab.h" }, - STANDARD_VTABLE(big2_) NULL_VTABLE}; + STANDARD_VTABLE(big2_) UTF16_NULL_VTABLE(big2_)}; # endif @@ -1003,13 +1041,13 @@ static const struct normal_encoding internal_big2_encoding # undef BT_COLON # include "latin1tab.h" }, - STANDARD_VTABLE(big2_) NULL_VTABLE}; + STANDARD_VTABLE(big2_) UTF16_NULL_VTABLE(big2_)}; #endif #undef PREFIX -static int FASTCALL +static int streqci(const char *s1, const char *s2) { for (;;) { char c1 = *s1++; @@ -1030,7 +1068,7 @@ streqci(const char *s1, const char *s2) { return 1; } -static void PTRCALL +static void initUpdatePosition(const ENCODING *enc, const char *ptr, const char *end, POSITION *pos) { UNUSED_P(enc); @@ -1048,7 +1086,7 @@ toAscii(const ENCODING *enc, const char *ptr, const char *end) { return buf[0]; } -static int FASTCALL +static int isSpace(int c) { switch (c) { case 0x20: @@ -1154,6 +1192,34 @@ static const char KW_yes[] = {ASCII_y, ASCII_e, ASCII_s, '\0'}; static const char KW_no[] = {ASCII_n, ASCII_o, '\0'}; +static const char KW_1_dot[] = {ASCII_1, ASCII_PERIOD, '\0'}; + +/* Checks a version pseudo-attribute value against the VersionNum production. + XML 1.0 Fourth Edition only allows the literal "1.0", but the Fifth + Edition relaxed this to "1." followed by one or more digits, since Expat + only implements 1.0 itself but plans to track the Fifth Edition's laxer + grammar here so that "1.1" and similar aren't rejected only to have that + rejection reverted later. Returns true for a value matching "1.[0-9]+". + val/valEnd bound the value itself; valEnd is the upper bound used when + decoding the individual characters between them. */ +static bool +checkXmlDeclVersionNum(const ENCODING *enc, const char *val, + const char *valEnd) { + if (valEnd - val < 2 * enc->minBytesPerChar + || ! XmlNameMatchesAscii(enc, val, val + 2 * enc->minBytesPerChar, + KW_1_dot)) + return false; + val += 2 * enc->minBytesPerChar; + if (val == valEnd) + return false; + for (; val != valEnd; val += enc->minBytesPerChar) { + int c = toAscii(enc, val, valEnd); + if (c < ASCII_0 || c > ASCII_9) + return false; + } + return true; +} + static int doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *, const char *, const char *), @@ -1188,6 +1254,15 @@ doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *, const char *, *badPtr = val; return 0; } + /* Expat implements XML 1.0 only, so any version outside the "1.0"/"1.x" + family is rejected. Following the Fifth Edition's VersionNum + production (rather than the Fourth Edition's exact "1.0") avoids + rejecting "1.1" now only to have to revert that once Expat tracks + the newer edition. */ + if (! checkXmlDeclVersionNum(enc, val, ptr - enc->minBytesPerChar)) { + *badPtr = val; + return 0; + } if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) { *badPtr = ptr; return 0; @@ -1242,7 +1317,7 @@ doParseXmlDecl(const ENCODING *(*encodingFinder)(const ENCODING *, const char *, return 1; } -static int FASTCALL +static int checkCharRefNumber(int result) { switch (result >> 8) { case 0xD8: @@ -1266,7 +1341,7 @@ checkCharRefNumber(int result) { return result; } -int FASTCALL +int XmlUtf8Encode(int c, char *buf) { enum { /* minN is minimum legal resulting value for N byte sequence */ @@ -1302,7 +1377,7 @@ XmlUtf8Encode(int c, char *buf) { return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */ } -int FASTCALL +int XmlUtf16Encode(int charNum, unsigned short *buf) { if (charNum < 0) return 0; @@ -1334,7 +1409,7 @@ XmlSizeOfUnknownEncoding(void) { return sizeof(struct unknown_encoding); } -static int PTRFASTCALL +static int unknown_isName(const ENCODING *enc, const char *p) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); int c = uenc->convert(uenc->userData, p); @@ -1343,7 +1418,7 @@ unknown_isName(const ENCODING *enc, const char *p) { return UCS2_GET_NAMING(namePages, c >> 8, c & 0xFF); } -static int PTRFASTCALL +static int unknown_isNmstrt(const ENCODING *enc, const char *p) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); int c = uenc->convert(uenc->userData, p); @@ -1352,14 +1427,14 @@ unknown_isNmstrt(const ENCODING *enc, const char *p) { return UCS2_GET_NAMING(nmstrtPages, c >> 8, c & 0xFF); } -static int PTRFASTCALL +static int unknown_isInvalid(const ENCODING *enc, const char *p) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); int c = uenc->convert(uenc->userData, p); return (c & ~0xFFFF) || checkCharRefNumber(c) < 0; } -static enum XML_Convert_Result PTRCALL +static enum XML_Convert_Result unknown_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, char **toP, const char *toLim) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); @@ -1389,7 +1464,7 @@ unknown_toUtf8(const ENCODING *enc, const char **fromP, const char *fromLim, } } -static enum XML_Convert_Result PTRCALL +static enum XML_Convert_Result unknown_toUtf16(const ENCODING *enc, const char **fromP, const char *fromLim, unsigned short **toP, const unsigned short *toLim) { const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); @@ -1513,7 +1588,7 @@ static const char KW_UTF_16LE[] = {ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, ASCII_L, ASCII_E, '\0'}; -static int FASTCALL +static int getEncodingIndex(const char *name) { static const char *const encodingNames[] = { KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE, diff --git a/Modules/expat/xmltok.h b/Modules/expat/xmltok.h index 76be2c7c5ca1ba..bf641af6d4f77f 100644 --- a/Modules/expat/xmltok.h +++ b/Modules/expat/xmltok.h @@ -41,10 +41,6 @@ # include // uint64_t -# ifdef __cplusplus -extern "C" { -# endif - /* The following token may be returned by XmlContentTok */ # define XML_TOK_TRAILING_RSQB \ -5 /* ] or ]] at the end of the scan; might be \ @@ -163,8 +159,8 @@ typedef struct { struct encoding; typedef struct encoding ENCODING; -typedef int(PTRCALL *SCANNER)(const ENCODING *, const char *, const char *, - const char **); +typedef int (*SCANNER)(const ENCODING *, const char *, const char *, + const char **); enum XML_Convert_Result { XML_CONVERT_COMPLETED = 0, @@ -176,28 +172,27 @@ enum XML_Convert_Result { struct encoding { SCANNER scanners[XML_N_STATES]; SCANNER literalScanners[XML_N_LITERAL_TYPES]; - int(PTRCALL *nameMatchesAscii)(const ENCODING *, const char *, const char *, - const char *); - int(PTRFASTCALL *nameLength)(const ENCODING *, const char *); - const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *); - int(PTRCALL *getAtts)(const ENCODING *enc, const char *ptr, int attsMax, - ATTRIBUTE *atts); - int(PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr); - int(PTRCALL *predefinedEntityName)(const ENCODING *, const char *, - const char *); - void(PTRCALL *updatePosition)(const ENCODING *, const char *ptr, - const char *end, POSITION *); - int(PTRCALL *isPublicId)(const ENCODING *enc, const char *ptr, - const char *end, const char **badPtr); - enum XML_Convert_Result(PTRCALL *utf8Convert)(const ENCODING *enc, - const char **fromP, - const char *fromLim, char **toP, - const char *toLim); - enum XML_Convert_Result(PTRCALL *utf16Convert)(const ENCODING *enc, - const char **fromP, - const char *fromLim, - unsigned short **toP, - const unsigned short *toLim); + int (*nameMatchesAscii)(const ENCODING *, const char *, const char *, + const char *); + int (*nameLength)(const ENCODING *, const char *); + const char *(*skipS)(const ENCODING *, const char *); + int (*getAtts)(const ENCODING *enc, const char *ptr, int attsMax, + ATTRIBUTE *atts); + int (*charRefNumber)(const ENCODING *enc, const char *ptr); + int (*predefinedEntityName)(const ENCODING *, const char *, const char *); + void (*updatePosition)(const ENCODING *, const char *ptr, const char *end, + POSITION *); + int (*isPublicId)(const ENCODING *enc, const char *ptr, const char *end, + const char **badPtr); + enum XML_Convert_Result (*utf8Convert)(const ENCODING *enc, + const char **fromP, + const char *fromLim, char **toP, + const char *toLim); + enum XML_Convert_Result (*utf16Convert)(const ENCODING *enc, + const char **fromP, + const char *fromLim, + unsigned short **toP, + const unsigned short *toLim); int minBytesPerChar; char isUtf8; char isUtf16; @@ -297,8 +292,8 @@ int XmlInitEncoding(INIT_ENCODING *p, const ENCODING **encPtr, const char *name); const ENCODING *XmlGetUtf8InternalEncoding(void); const ENCODING *XmlGetUtf16InternalEncoding(void); -int FASTCALL XmlUtf8Encode(int charNumber, char *buf); -int FASTCALL XmlUtf16Encode(int charNumber, unsigned short *buf); +int XmlUtf8Encode(int charNumber, char *buf); +int XmlUtf16Encode(int charNumber, unsigned short *buf); int XmlSizeOfUnknownEncoding(void); typedef int(XMLCALL *CONVERTER)(void *userData, const char *p); @@ -318,8 +313,5 @@ const ENCODING *XmlGetUtf8InternalEncodingNS(void); const ENCODING *XmlGetUtf16InternalEncodingNS(void); ENCODING *XmlInitUnknownEncodingNS(void *mem, const int *table, CONVERTER convert, void *userData); -# ifdef __cplusplus -} -# endif #endif /* not XmlTok_INCLUDED */ diff --git a/Modules/expat/xmltok_impl.c b/Modules/expat/xmltok_impl.c index 1d8e457d9de544..a71a2fd88c704b 100644 --- a/Modules/expat/xmltok_impl.c +++ b/Modules/expat/xmltok_impl.c @@ -10,7 +10,7 @@ Copyright (c) 2000 Clark Cooper Copyright (c) 2002 Fred L. Drake, Jr. Copyright (c) 2002-2016 Karl Waclawek - Copyright (c) 2016-2022 Sebastian Pipping + Copyright (c) 2016-2026 Sebastian Pipping Copyright (c) 2017 Rhodri James Copyright (c) 2018 Benjamin Peterson Copyright (c) 2018 Anton Maklakov @@ -18,6 +18,7 @@ Copyright (c) 2020 Boris Kolpackov Copyright (c) 2022 Martin Ettl Copyright (c) 2026 Nick Begg + Copyright (c) 2026 Kartik Kenchi Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -44,10 +45,6 @@ #ifdef XML_TOK_IMPL_C -# ifndef IS_INVALID_CHAR // i.e. for UTF-16 and XML_MIN_SIZE not defined -# define IS_INVALID_CHAR(enc, ptr, n) (0) -# endif - # define INVALID_LEAD_CASE(n, ptr, nextTokPtr) \ case BT_LEAD##n: \ if (end - ptr < n) \ @@ -144,7 +141,7 @@ /* ptr points to character following "= end) @@ -430,7 +427,7 @@ PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr, const char *end, /* ptr points to character following "= end) @@ -922,7 +919,7 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end, /* ptr points to character following "%" */ -static int PTRCALL +static int PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { REQUIRE_CHAR(enc, ptr, end); @@ -952,7 +949,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, return XML_TOK_PARTIAL; } -static int PTRCALL +static int PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { REQUIRE_CHAR(enc, ptr, end); @@ -982,7 +979,7 @@ PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, return -XML_TOK_POUND_NAME; } -static int PTRCALL +static int PREFIX(scanLit)(int open, const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { while (HAS_CHAR(enc, ptr, end)) { @@ -1016,7 +1013,7 @@ PREFIX(scanLit)(int open, const ENCODING *enc, const char *ptr, const char *end, return XML_TOK_PARTIAL; } -static int PTRCALL +static int PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int tok; @@ -1260,7 +1257,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, return -tok; } -static int PTRCALL +static int PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { const char *start; @@ -1329,7 +1326,7 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, const char *end, return XML_TOK_DATA_CHARS; } -static int PTRCALL +static int PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { const char *start; @@ -1396,7 +1393,7 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end, # ifdef XML_DTD -static int PTRCALL +static int PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { int level = 0; @@ -1448,7 +1445,7 @@ PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, const char *end, # endif /* XML_DTD */ -static int PTRCALL +static int PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, const char **badPtr) { ptr += MINBPC(enc); @@ -1508,7 +1505,7 @@ PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, first attsMax attributes are stored in atts. */ -static int PTRCALL +static int PREFIX(getAtts)(const ENCODING *enc, const char *ptr, int attsMax, ATTRIBUTE *atts) { enum { other, inName, inValue } state = inName; @@ -1601,7 +1598,7 @@ PREFIX(getAtts)(const ENCODING *enc, const char *ptr, int attsMax, /* not reached */ } -static int PTRFASTCALL +static int PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) { int result = 0; /* skip &# */ @@ -1659,7 +1656,7 @@ PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) { return checkCharRefNumber(result); } -static int PTRCALL +static int PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, const char *end) { UNUSED_P(enc); @@ -1713,7 +1710,7 @@ PREFIX(predefinedEntityName)(const ENCODING *enc, const char *ptr, return 0; } -static int PTRCALL +static int PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, const char *end1, const char *ptr2) { UNUSED_P(enc); @@ -1732,7 +1729,7 @@ PREFIX(nameMatchesAscii)(const ENCODING *enc, const char *ptr1, return ptr1 == end1; } -static int PTRFASTCALL +static int PREFIX(nameLength)(const ENCODING *enc, const char *ptr) { const char *start = ptr; for (;;) { @@ -1762,7 +1759,7 @@ PREFIX(nameLength)(const ENCODING *enc, const char *ptr) { } } -static const char *PTRFASTCALL +static const char * PREFIX(skipS)(const ENCODING *enc, const char *ptr) { for (;;) { switch (BYTE_TYPE(enc, ptr)) { @@ -1777,7 +1774,7 @@ PREFIX(skipS)(const ENCODING *enc, const char *ptr) { } } -static void PTRCALL +static void PREFIX(updatePosition)(const ENCODING *enc, const char *ptr, const char *end, POSITION *pos) { while (HAS_CHAR(enc, ptr, end)) { diff --git a/Modules/expat/xmltok_ns.c b/Modules/expat/xmltok_ns.c index 40a02a0308b563..d9f69abb92ef39 100644 --- a/Modules/expat/xmltok_ns.c +++ b/Modules/expat/xmltok_ns.c @@ -11,7 +11,7 @@ Copyright (c) 2002 Greg Stein Copyright (c) 2002 Fred L. Drake, Jr. Copyright (c) 2002-2006 Karl Waclawek - Copyright (c) 2017-2021 Sebastian Pipping + Copyright (c) 2017-2026 Sebastian Pipping Copyright (c) 2025 Alfonso Gregory Licensed under the MIT license: @@ -64,14 +64,14 @@ static const ENCODING *const NS(encodings)[] = { &ns(utf8_encoding).enc /* NO_ENC */ }; -static int PTRCALL +static int NS(initScanProlog)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_PROLOG_STATE, ptr, end, nextTokPtr); } -static int PTRCALL +static int NS(initScanContent)(const ENCODING *enc, const char *ptr, const char *end, const char **nextTokPtr) { return initScan(NS(encodings), (const INIT_ENCODING *)enc, XML_CONTENT_STATE, diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index 9eb0dddb2488e2..e97f6fbc4542c8 100644 --- a/Modules/pyexpat.c +++ b/Modules/pyexpat.c @@ -2552,7 +2552,10 @@ pyexpat_exec(PyObject *mod) capi->SetEncoding = XML_SetEncoding; capi->DefaultUnknownEncodingHandler = PyUnknownEncodingHandler; #if XML_COMBINED_VERSION >= 20100 +_Py_COMP_DIAG_PUSH +_Py_COMP_DIAG_IGNORE_DEPR_DECLS capi->SetHashSalt = XML_SetHashSalt; +_Py_COMP_DIAG_POP #else capi->SetHashSalt = NULL; #endif diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c index 0bcd0b6596be77..f419795d1eb3ca 100644 --- a/Objects/memoryobject.c +++ b/Objects/memoryobject.c @@ -2037,7 +2037,9 @@ pack_single(PyMemoryViewObject *self, char *ptr, PyObject *item, const char *fmt goto err_occurred; CHECK_RELEASED_INT_AGAIN(self); if (fmt[0] == 'f') { - PACK_SINGLE(ptr, d, float); + if (PyFloat_Pack4(d, ptr, endian) < 0) { + goto err_occurred; + } } else if (fmt[0] == 'd') { PACK_SINGLE(ptr, d, double); @@ -2064,9 +2066,15 @@ pack_single(PyMemoryViewObject *self, char *ptr, PyObject *item, const char *fmt memcpy(ptr, &x, sizeof(x)); } else { - float x[2] = {(float)c.real, (float)c.imag}; - - memcpy(ptr, &x, sizeof(x)); + char tmp[8]; + + if (PyFloat_Pack4(c.real, tmp, endian) < 0) { + goto err_occurred; + } + if (PyFloat_Pack4(c.imag, tmp + 4, endian) < 0) { + goto err_occurred; + } + memcpy(ptr, tmp, 8); } break; diff --git a/PCbuild/_elementtree.vcxproj b/PCbuild/_elementtree.vcxproj index 46e34a5ea82d5d..c102da85e9c516 100644 --- a/PCbuild/_elementtree.vcxproj +++ b/PCbuild/_elementtree.vcxproj @@ -104,6 +104,7 @@ + diff --git a/PCbuild/_elementtree.vcxproj.filters b/PCbuild/_elementtree.vcxproj.filters index f6b55d8ff82a68..9e2e062af3f387 100644 --- a/PCbuild/_elementtree.vcxproj.filters +++ b/PCbuild/_elementtree.vcxproj.filters @@ -36,6 +36,9 @@ Header Files\expat + + Header Files\expat + Header Files\expat diff --git a/PCbuild/pyexpat.vcxproj b/PCbuild/pyexpat.vcxproj index 8a60ee15eb41bf..cf60976266eb8b 100644 --- a/PCbuild/pyexpat.vcxproj +++ b/PCbuild/pyexpat.vcxproj @@ -96,6 +96,7 @@ + diff --git a/PCbuild/pyexpat.vcxproj.filters b/PCbuild/pyexpat.vcxproj.filters index 230531033fccd8..e63cb9c63063ac 100644 --- a/PCbuild/pyexpat.vcxproj.filters +++ b/PCbuild/pyexpat.vcxproj.filters @@ -15,6 +15,9 @@ Header Files + + Header Files + Header Files diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 2cd34e4eb70f9b..93baea2130c889 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -786,63 +786,124 @@ def visitConstructor(self, cons, name): class AnnotationsVisitor(PickleVisitor): def visitModule(self, mod): + self.nodes = [] + for dfn in mod.dfns: + self.visit(dfn) + builtins = list(dict.fromkeys(builtin_type_to_c_type.values())) self.file.write(textwrap.dedent(''' static int add_ast_annotations(struct ast_state *state) { - bool cond; + enum { + FIELD_OPTIONAL = 1, + FIELD_SEQUENCE = 2, + FIELD_BUILTIN = 4, + }; + static PyTypeObject *const builtin_types[] = { ''')) - for dfn in mod.dfns: - self.visit(dfn) - self.file.write(textwrap.dedent(''' + for c_type in builtins: + self.emit(f"&{c_type},", 2) + self.file.write(textwrap.dedent('''\ + }; + // Offsets refer to this interpreter's AST state, not global types. + static_assert(sizeof(struct ast_state) <= UINT16_MAX, + "ast_state offsets must fit in uint16_t"); + static const struct { + uint16_t name_offset; + uint16_t type_offset; // An index into builtin_types for builtins. + uint8_t flags; + } fields[] = { + #''').removesuffix('#')) # Use d-string if it accepted. + for name, fields in self.nodes: + for field in fields: + flags = [] + if field.opt: + flags.append("FIELD_OPTIONAL") + elif field.seq: + flags.append("FIELD_SEQUENCE") + if field.type in builtin_type_to_c_type: + c_type = builtin_type_to_c_type[field.type] + type_offset = str(builtins.index(c_type)) + flags.append("FIELD_BUILTIN") + else: + type_offset = f"offsetof(struct ast_state, {field.type}_type)" + flags = " | ".join(flags) or "0" + self.emit(f"{{offsetof(struct ast_state, {field.name}),", 2) + self.emit(f" {type_offset}, {flags}}},", 2) + self.file.write(textwrap.dedent('''\ + }; + static const struct { + uint16_t type_offset; + uint16_t first_field; + uint16_t nfields; + } nodes[] = { + #''').removesuffix('#')) + start = 0 + for name, fields in self.nodes: + self.emit(f"{{offsetof(struct ast_state, {name}_type), " + f"{start}, {len(fields)}}},", 2) + start += len(fields) + self.file.write(textwrap.dedent('''\ + }; + char *base = (char *)state; + PyObject *annotations = NULL; + for (size_t i = 0; i < Py_ARRAY_LENGTH(nodes); i++) { + annotations = PyDict_New(); + if (annotations == NULL) { + goto error; + } + size_t end = nodes[i].first_field + nodes[i].nfields; + for (size_t j = nodes[i].first_field; j < end; j++) { + PyObject *name = *(PyObject **)(base + fields[j].name_offset); + PyObject *type; + if (fields[j].flags & FIELD_BUILTIN) { + type = (PyObject *)builtin_types[fields[j].type_offset]; + } + else { + type = *(PyObject **)(base + fields[j].type_offset); + } + if (fields[j].flags & FIELD_OPTIONAL) { + type = _Py_union_type_or(type, Py_None); + } + else if (fields[j].flags & FIELD_SEQUENCE) { + type = Py_GenericAlias((PyObject *)&PyList_Type, type); + } + else { + Py_INCREF(type); + } + if (type == NULL) { + goto error; + } + int res = PyDict_SetItem(annotations, name, type); + Py_DECREF(type); + if (res < 0) { + goto error; + } + } + PyObject *node = *(PyObject **)(base + nodes[i].type_offset); + if (PyObject_SetAttrString(node, "_field_types", annotations) < 0 || + PyObject_SetAttrString(node, "__annotations__", annotations) < 0) + { + goto error; + } + Py_CLEAR(annotations); + } return 1; + error: + Py_XDECREF(annotations); + return 0; } ''')) def visitProduct(self, prod, name): - self.emit_annotations(name, prod.fields) + self.nodes.append((name, prod.fields)) def visitSum(self, sum, name): for t in sum.types: self.visitConstructor(t, name) def visitConstructor(self, cons, name): - self.emit_annotations(cons.name, cons.fields) - - def emit_annotations(self, name, fields): - self.emit(f"PyObject *{name}_annotations = PyDict_New();", 1) - self.emit(f"if (!{name}_annotations) return 0;", 1) - for field in fields: - self.emit("{", 1) - if field.type in builtin_type_to_c_type: - self.emit(f"PyObject *type = (PyObject *)&{builtin_type_to_c_type[field.type]};", 2) - else: - self.emit(f"PyObject *type = state->{field.type}_type;", 2) - if field.opt: - self.emit("type = _Py_union_type_or(type, Py_None);", 2) - self.emit("cond = type != NULL;", 2) - self.emit_annotations_error(name, 2) - elif field.seq: - self.emit("type = Py_GenericAlias((PyObject *)&PyList_Type, type);", 2) - self.emit("cond = type != NULL;", 2) - self.emit_annotations_error(name, 2) - else: - self.emit("Py_INCREF(type);", 2) - self.emit(f"cond = PyDict_SetItemString({name}_annotations, \"{field.name}\", type) == 0;", 2) - self.emit("Py_DECREF(type);", 2) - self.emit_annotations_error(name, 2) - self.emit("}", 1) - self.emit(f'cond = PyObject_SetAttrString(state->{name}_type, "_field_types", {name}_annotations) == 0;', 1) - self.emit_annotations_error(name, 1) - self.emit(f'cond = PyObject_SetAttrString(state->{name}_type, "__annotations__", {name}_annotations) == 0;', 1) - self.emit_annotations_error(name, 1) - self.emit(f"Py_DECREF({name}_annotations);", 1) - - def emit_annotations_error(self, name, depth): - self.emit("if (!cond) {", depth) - self.emit(f"Py_DECREF({name}_annotations);", depth + 1) - self.emit("return 0;", depth + 1) - self.emit("}", depth) + self.nodes.append((cons.name, cons.fields)) class PyTypesVisitor(PickleVisitor): @@ -2212,9 +2273,15 @@ def generate_ast_fini(module_state, f): struct ast_state *state = &interp->ast; """)) + f.write(" static const size_t offsets[] = {\n") for s in module_state: - f.write(" Py_CLEAR(state->" + s + ');\n') + f.write(" offsetof(struct ast_state, " + s + "),\n") + f.write(" };\n") f.write(textwrap.dedent(""" + for (size_t i = 0; i < Py_ARRAY_LENGTH(offsets); i++) { + PyObject **field = (PyObject **)((char *)state + offsets[i]); + Py_CLEAR(*field); + } state->finalized = 1; state->once = (_PyOnceFlag){0}; } diff --git a/Programs/_testembed.c b/Programs/_testembed.c index 418609abc5f6b8..63260c9e5f6cc4 100644 --- a/Programs/_testembed.c +++ b/Programs/_testembed.c @@ -2357,6 +2357,43 @@ static int test_isinitialized_false_during_site_import(void) } +static int test_py_getenv(void) +{ + const char *name = "PYTHON_TESTEMBED_VARIABLE"; + const char *expected = "expected_value"; + putenv("PYTHON_TESTEMBED_VARIABLE=expected_value"); + + const char *var = Py_GETENV(name); + if (var == NULL || strcmp(var, expected) != 0) { + error_fmt("%s is not set before Python initialization", name); + return 1; + } + + // Initialize Python with use_environment=0 + PyConfig config; + _PyConfig_InitCompatConfig(&config); + config_set_program_name(&config); + config.use_environment = 0; + init_from_config_clear(&config); + + var = Py_GETENV(name); + if (var != NULL) { + error_fmt("Py_GETENV() doesn't ignore %s after Python init", name); + return 1; + } + + Py_Finalize(); + var = Py_GETENV(name); + if (var == NULL || strcmp(var, expected) != 0) { + error_fmt("%s is not set after Python finalization", name); + return 1; + } + + printf("OK\n"); + return 0; +} + + #ifndef MS_WINDOWS #include "test_frozenmain.h" // M_test_frozenmain @@ -3059,6 +3096,7 @@ static struct TestCase TestCases[] = { {"test_init_main_interpreter_settings", test_init_main_interpreter_settings}, {"test_init_in_background_thread", test_init_in_background_thread}, {"test_isinitialized_false_during_site_import", test_isinitialized_false_during_site_import}, + {"test_py_getenv", test_py_getenv}, // Audit {"test_open_code_hook", test_open_code_hook}, diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 83d058e8357196..2038b14811d3c0 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -33,255 +33,261 @@ void _PyAST_Fini(PyInterpreterState *interp) { struct ast_state *state = &interp->ast; - Py_CLEAR(state->AST_type); - Py_CLEAR(state->Add_singleton); - Py_CLEAR(state->Add_type); - Py_CLEAR(state->And_singleton); - Py_CLEAR(state->And_type); - Py_CLEAR(state->AnnAssign_type); - Py_CLEAR(state->Assert_type); - Py_CLEAR(state->Assign_type); - Py_CLEAR(state->AsyncFor_type); - Py_CLEAR(state->AsyncFunctionDef_type); - Py_CLEAR(state->AsyncWith_type); - Py_CLEAR(state->Attribute_type); - Py_CLEAR(state->AugAssign_type); - Py_CLEAR(state->Await_type); - Py_CLEAR(state->BinOp_type); - Py_CLEAR(state->BitAnd_singleton); - Py_CLEAR(state->BitAnd_type); - Py_CLEAR(state->BitOr_singleton); - Py_CLEAR(state->BitOr_type); - Py_CLEAR(state->BitXor_singleton); - Py_CLEAR(state->BitXor_type); - Py_CLEAR(state->BoolOp_type); - Py_CLEAR(state->Break_type); - Py_CLEAR(state->Call_type); - Py_CLEAR(state->ClassDef_type); - Py_CLEAR(state->Compare_type); - Py_CLEAR(state->Constant_type); - Py_CLEAR(state->Continue_type); - Py_CLEAR(state->Del_singleton); - Py_CLEAR(state->Del_type); - Py_CLEAR(state->Delete_type); - Py_CLEAR(state->DictComp_type); - Py_CLEAR(state->Dict_type); - Py_CLEAR(state->Div_singleton); - Py_CLEAR(state->Div_type); - Py_CLEAR(state->Eq_singleton); - Py_CLEAR(state->Eq_type); - Py_CLEAR(state->ExceptHandler_type); - Py_CLEAR(state->Expr_type); - Py_CLEAR(state->Expression_type); - Py_CLEAR(state->FloorDiv_singleton); - Py_CLEAR(state->FloorDiv_type); - Py_CLEAR(state->For_type); - Py_CLEAR(state->FormattedValue_type); - Py_CLEAR(state->FunctionDef_type); - Py_CLEAR(state->FunctionType_type); - Py_CLEAR(state->GeneratorExp_type); - Py_CLEAR(state->Global_type); - Py_CLEAR(state->GtE_singleton); - Py_CLEAR(state->GtE_type); - Py_CLEAR(state->Gt_singleton); - Py_CLEAR(state->Gt_type); - Py_CLEAR(state->IfExp_type); - Py_CLEAR(state->If_type); - Py_CLEAR(state->ImportFrom_type); - Py_CLEAR(state->Import_type); - Py_CLEAR(state->In_singleton); - Py_CLEAR(state->In_type); - Py_CLEAR(state->Interactive_type); - Py_CLEAR(state->Interpolation_type); - Py_CLEAR(state->Invert_singleton); - Py_CLEAR(state->Invert_type); - Py_CLEAR(state->IsNot_singleton); - Py_CLEAR(state->IsNot_type); - Py_CLEAR(state->Is_singleton); - Py_CLEAR(state->Is_type); - Py_CLEAR(state->JoinedStr_type); - Py_CLEAR(state->LShift_singleton); - Py_CLEAR(state->LShift_type); - Py_CLEAR(state->Lambda_type); - Py_CLEAR(state->ListComp_type); - Py_CLEAR(state->List_type); - Py_CLEAR(state->Load_singleton); - Py_CLEAR(state->Load_type); - Py_CLEAR(state->LtE_singleton); - Py_CLEAR(state->LtE_type); - Py_CLEAR(state->Lt_singleton); - Py_CLEAR(state->Lt_type); - Py_CLEAR(state->MatMult_singleton); - Py_CLEAR(state->MatMult_type); - Py_CLEAR(state->MatchAs_type); - Py_CLEAR(state->MatchClass_type); - Py_CLEAR(state->MatchMapping_type); - Py_CLEAR(state->MatchOr_type); - Py_CLEAR(state->MatchSequence_type); - Py_CLEAR(state->MatchSingleton_type); - Py_CLEAR(state->MatchStar_type); - Py_CLEAR(state->MatchValue_type); - Py_CLEAR(state->Match_type); - Py_CLEAR(state->Mod_singleton); - Py_CLEAR(state->Mod_type); - Py_CLEAR(state->Module_type); - Py_CLEAR(state->Mult_singleton); - Py_CLEAR(state->Mult_type); - Py_CLEAR(state->Name_type); - Py_CLEAR(state->NamedExpr_type); - Py_CLEAR(state->Nonlocal_type); - Py_CLEAR(state->NotEq_singleton); - Py_CLEAR(state->NotEq_type); - Py_CLEAR(state->NotIn_singleton); - Py_CLEAR(state->NotIn_type); - Py_CLEAR(state->Not_singleton); - Py_CLEAR(state->Not_type); - Py_CLEAR(state->Or_singleton); - Py_CLEAR(state->Or_type); - Py_CLEAR(state->ParamSpec_type); - Py_CLEAR(state->Pass_type); - Py_CLEAR(state->Pow_singleton); - Py_CLEAR(state->Pow_type); - Py_CLEAR(state->RShift_singleton); - Py_CLEAR(state->RShift_type); - Py_CLEAR(state->Raise_type); - Py_CLEAR(state->Return_type); - Py_CLEAR(state->SetComp_type); - Py_CLEAR(state->Set_type); - Py_CLEAR(state->Slice_type); - Py_CLEAR(state->Starred_type); - Py_CLEAR(state->Store_singleton); - Py_CLEAR(state->Store_type); - Py_CLEAR(state->Sub_singleton); - Py_CLEAR(state->Sub_type); - Py_CLEAR(state->Subscript_type); - Py_CLEAR(state->TemplateStr_type); - Py_CLEAR(state->TryStar_type); - Py_CLEAR(state->Try_type); - Py_CLEAR(state->Tuple_type); - Py_CLEAR(state->TypeAlias_type); - Py_CLEAR(state->TypeIgnore_type); - Py_CLEAR(state->TypeVarTuple_type); - Py_CLEAR(state->TypeVar_type); - Py_CLEAR(state->UAdd_singleton); - Py_CLEAR(state->UAdd_type); - Py_CLEAR(state->USub_singleton); - Py_CLEAR(state->USub_type); - Py_CLEAR(state->UnaryOp_type); - Py_CLEAR(state->While_type); - Py_CLEAR(state->With_type); - Py_CLEAR(state->YieldFrom_type); - Py_CLEAR(state->Yield_type); - Py_CLEAR(state->__dict__); - Py_CLEAR(state->__doc__); - Py_CLEAR(state->__match_args__); - Py_CLEAR(state->__module__); - Py_CLEAR(state->_attributes); - Py_CLEAR(state->_fields); - Py_CLEAR(state->abstract_types); - Py_CLEAR(state->alias_type); - Py_CLEAR(state->annotation); - Py_CLEAR(state->arg); - Py_CLEAR(state->arg_type); - Py_CLEAR(state->args); - Py_CLEAR(state->argtypes); - Py_CLEAR(state->arguments_type); - Py_CLEAR(state->asname); - Py_CLEAR(state->ast); - Py_CLEAR(state->attr); - Py_CLEAR(state->bases); - Py_CLEAR(state->body); - Py_CLEAR(state->boolop_type); - Py_CLEAR(state->bound); - Py_CLEAR(state->cases); - Py_CLEAR(state->cause); - Py_CLEAR(state->cls); - Py_CLEAR(state->cmpop_type); - Py_CLEAR(state->col_offset); - Py_CLEAR(state->comparators); - Py_CLEAR(state->comprehension_type); - Py_CLEAR(state->context_expr); - Py_CLEAR(state->conversion); - Py_CLEAR(state->ctx); - Py_CLEAR(state->decorator_list); - Py_CLEAR(state->default_value); - Py_CLEAR(state->defaults); - Py_CLEAR(state->elt); - Py_CLEAR(state->elts); - Py_CLEAR(state->end_col_offset); - Py_CLEAR(state->end_lineno); - Py_CLEAR(state->exc); - Py_CLEAR(state->excepthandler_type); - Py_CLEAR(state->expr_context_type); - Py_CLEAR(state->expr_type); - Py_CLEAR(state->finalbody); - Py_CLEAR(state->format_spec); - Py_CLEAR(state->func); - Py_CLEAR(state->generators); - Py_CLEAR(state->guard); - Py_CLEAR(state->handlers); - Py_CLEAR(state->id); - Py_CLEAR(state->ifs); - Py_CLEAR(state->is_async); - Py_CLEAR(state->is_lazy); - Py_CLEAR(state->items); - Py_CLEAR(state->iter); - Py_CLEAR(state->key); - Py_CLEAR(state->keys); - Py_CLEAR(state->keyword_type); - Py_CLEAR(state->keywords); - Py_CLEAR(state->kind); - Py_CLEAR(state->kw_defaults); - Py_CLEAR(state->kwarg); - Py_CLEAR(state->kwd_attrs); - Py_CLEAR(state->kwd_patterns); - Py_CLEAR(state->kwonlyargs); - Py_CLEAR(state->left); - Py_CLEAR(state->level); - Py_CLEAR(state->lineno); - Py_CLEAR(state->lower); - Py_CLEAR(state->match_case_type); - Py_CLEAR(state->mod_type); - Py_CLEAR(state->module); - Py_CLEAR(state->msg); - Py_CLEAR(state->name); - Py_CLEAR(state->names); - Py_CLEAR(state->op); - Py_CLEAR(state->operand); - Py_CLEAR(state->operator_type); - Py_CLEAR(state->ops); - Py_CLEAR(state->optional_vars); - Py_CLEAR(state->orelse); - Py_CLEAR(state->pattern); - Py_CLEAR(state->pattern_type); - Py_CLEAR(state->patterns); - Py_CLEAR(state->posonlyargs); - Py_CLEAR(state->rest); - Py_CLEAR(state->returns); - Py_CLEAR(state->right); - Py_CLEAR(state->simple); - Py_CLEAR(state->slice); - Py_CLEAR(state->step); - Py_CLEAR(state->stmt_type); - Py_CLEAR(state->str); - Py_CLEAR(state->subject); - Py_CLEAR(state->tag); - Py_CLEAR(state->target); - Py_CLEAR(state->targets); - Py_CLEAR(state->test); - Py_CLEAR(state->type); - Py_CLEAR(state->type_comment); - Py_CLEAR(state->type_ignore_type); - Py_CLEAR(state->type_ignores); - Py_CLEAR(state->type_param_type); - Py_CLEAR(state->type_params); - Py_CLEAR(state->unaryop_type); - Py_CLEAR(state->upper); - Py_CLEAR(state->value); - Py_CLEAR(state->values); - Py_CLEAR(state->vararg); - Py_CLEAR(state->withitem_type); - + static const size_t offsets[] = { + offsetof(struct ast_state, AST_type), + offsetof(struct ast_state, Add_singleton), + offsetof(struct ast_state, Add_type), + offsetof(struct ast_state, And_singleton), + offsetof(struct ast_state, And_type), + offsetof(struct ast_state, AnnAssign_type), + offsetof(struct ast_state, Assert_type), + offsetof(struct ast_state, Assign_type), + offsetof(struct ast_state, AsyncFor_type), + offsetof(struct ast_state, AsyncFunctionDef_type), + offsetof(struct ast_state, AsyncWith_type), + offsetof(struct ast_state, Attribute_type), + offsetof(struct ast_state, AugAssign_type), + offsetof(struct ast_state, Await_type), + offsetof(struct ast_state, BinOp_type), + offsetof(struct ast_state, BitAnd_singleton), + offsetof(struct ast_state, BitAnd_type), + offsetof(struct ast_state, BitOr_singleton), + offsetof(struct ast_state, BitOr_type), + offsetof(struct ast_state, BitXor_singleton), + offsetof(struct ast_state, BitXor_type), + offsetof(struct ast_state, BoolOp_type), + offsetof(struct ast_state, Break_type), + offsetof(struct ast_state, Call_type), + offsetof(struct ast_state, ClassDef_type), + offsetof(struct ast_state, Compare_type), + offsetof(struct ast_state, Constant_type), + offsetof(struct ast_state, Continue_type), + offsetof(struct ast_state, Del_singleton), + offsetof(struct ast_state, Del_type), + offsetof(struct ast_state, Delete_type), + offsetof(struct ast_state, DictComp_type), + offsetof(struct ast_state, Dict_type), + offsetof(struct ast_state, Div_singleton), + offsetof(struct ast_state, Div_type), + offsetof(struct ast_state, Eq_singleton), + offsetof(struct ast_state, Eq_type), + offsetof(struct ast_state, ExceptHandler_type), + offsetof(struct ast_state, Expr_type), + offsetof(struct ast_state, Expression_type), + offsetof(struct ast_state, FloorDiv_singleton), + offsetof(struct ast_state, FloorDiv_type), + offsetof(struct ast_state, For_type), + offsetof(struct ast_state, FormattedValue_type), + offsetof(struct ast_state, FunctionDef_type), + offsetof(struct ast_state, FunctionType_type), + offsetof(struct ast_state, GeneratorExp_type), + offsetof(struct ast_state, Global_type), + offsetof(struct ast_state, GtE_singleton), + offsetof(struct ast_state, GtE_type), + offsetof(struct ast_state, Gt_singleton), + offsetof(struct ast_state, Gt_type), + offsetof(struct ast_state, IfExp_type), + offsetof(struct ast_state, If_type), + offsetof(struct ast_state, ImportFrom_type), + offsetof(struct ast_state, Import_type), + offsetof(struct ast_state, In_singleton), + offsetof(struct ast_state, In_type), + offsetof(struct ast_state, Interactive_type), + offsetof(struct ast_state, Interpolation_type), + offsetof(struct ast_state, Invert_singleton), + offsetof(struct ast_state, Invert_type), + offsetof(struct ast_state, IsNot_singleton), + offsetof(struct ast_state, IsNot_type), + offsetof(struct ast_state, Is_singleton), + offsetof(struct ast_state, Is_type), + offsetof(struct ast_state, JoinedStr_type), + offsetof(struct ast_state, LShift_singleton), + offsetof(struct ast_state, LShift_type), + offsetof(struct ast_state, Lambda_type), + offsetof(struct ast_state, ListComp_type), + offsetof(struct ast_state, List_type), + offsetof(struct ast_state, Load_singleton), + offsetof(struct ast_state, Load_type), + offsetof(struct ast_state, LtE_singleton), + offsetof(struct ast_state, LtE_type), + offsetof(struct ast_state, Lt_singleton), + offsetof(struct ast_state, Lt_type), + offsetof(struct ast_state, MatMult_singleton), + offsetof(struct ast_state, MatMult_type), + offsetof(struct ast_state, MatchAs_type), + offsetof(struct ast_state, MatchClass_type), + offsetof(struct ast_state, MatchMapping_type), + offsetof(struct ast_state, MatchOr_type), + offsetof(struct ast_state, MatchSequence_type), + offsetof(struct ast_state, MatchSingleton_type), + offsetof(struct ast_state, MatchStar_type), + offsetof(struct ast_state, MatchValue_type), + offsetof(struct ast_state, Match_type), + offsetof(struct ast_state, Mod_singleton), + offsetof(struct ast_state, Mod_type), + offsetof(struct ast_state, Module_type), + offsetof(struct ast_state, Mult_singleton), + offsetof(struct ast_state, Mult_type), + offsetof(struct ast_state, Name_type), + offsetof(struct ast_state, NamedExpr_type), + offsetof(struct ast_state, Nonlocal_type), + offsetof(struct ast_state, NotEq_singleton), + offsetof(struct ast_state, NotEq_type), + offsetof(struct ast_state, NotIn_singleton), + offsetof(struct ast_state, NotIn_type), + offsetof(struct ast_state, Not_singleton), + offsetof(struct ast_state, Not_type), + offsetof(struct ast_state, Or_singleton), + offsetof(struct ast_state, Or_type), + offsetof(struct ast_state, ParamSpec_type), + offsetof(struct ast_state, Pass_type), + offsetof(struct ast_state, Pow_singleton), + offsetof(struct ast_state, Pow_type), + offsetof(struct ast_state, RShift_singleton), + offsetof(struct ast_state, RShift_type), + offsetof(struct ast_state, Raise_type), + offsetof(struct ast_state, Return_type), + offsetof(struct ast_state, SetComp_type), + offsetof(struct ast_state, Set_type), + offsetof(struct ast_state, Slice_type), + offsetof(struct ast_state, Starred_type), + offsetof(struct ast_state, Store_singleton), + offsetof(struct ast_state, Store_type), + offsetof(struct ast_state, Sub_singleton), + offsetof(struct ast_state, Sub_type), + offsetof(struct ast_state, Subscript_type), + offsetof(struct ast_state, TemplateStr_type), + offsetof(struct ast_state, TryStar_type), + offsetof(struct ast_state, Try_type), + offsetof(struct ast_state, Tuple_type), + offsetof(struct ast_state, TypeAlias_type), + offsetof(struct ast_state, TypeIgnore_type), + offsetof(struct ast_state, TypeVarTuple_type), + offsetof(struct ast_state, TypeVar_type), + offsetof(struct ast_state, UAdd_singleton), + offsetof(struct ast_state, UAdd_type), + offsetof(struct ast_state, USub_singleton), + offsetof(struct ast_state, USub_type), + offsetof(struct ast_state, UnaryOp_type), + offsetof(struct ast_state, While_type), + offsetof(struct ast_state, With_type), + offsetof(struct ast_state, YieldFrom_type), + offsetof(struct ast_state, Yield_type), + offsetof(struct ast_state, __dict__), + offsetof(struct ast_state, __doc__), + offsetof(struct ast_state, __match_args__), + offsetof(struct ast_state, __module__), + offsetof(struct ast_state, _attributes), + offsetof(struct ast_state, _fields), + offsetof(struct ast_state, abstract_types), + offsetof(struct ast_state, alias_type), + offsetof(struct ast_state, annotation), + offsetof(struct ast_state, arg), + offsetof(struct ast_state, arg_type), + offsetof(struct ast_state, args), + offsetof(struct ast_state, argtypes), + offsetof(struct ast_state, arguments_type), + offsetof(struct ast_state, asname), + offsetof(struct ast_state, ast), + offsetof(struct ast_state, attr), + offsetof(struct ast_state, bases), + offsetof(struct ast_state, body), + offsetof(struct ast_state, boolop_type), + offsetof(struct ast_state, bound), + offsetof(struct ast_state, cases), + offsetof(struct ast_state, cause), + offsetof(struct ast_state, cls), + offsetof(struct ast_state, cmpop_type), + offsetof(struct ast_state, col_offset), + offsetof(struct ast_state, comparators), + offsetof(struct ast_state, comprehension_type), + offsetof(struct ast_state, context_expr), + offsetof(struct ast_state, conversion), + offsetof(struct ast_state, ctx), + offsetof(struct ast_state, decorator_list), + offsetof(struct ast_state, default_value), + offsetof(struct ast_state, defaults), + offsetof(struct ast_state, elt), + offsetof(struct ast_state, elts), + offsetof(struct ast_state, end_col_offset), + offsetof(struct ast_state, end_lineno), + offsetof(struct ast_state, exc), + offsetof(struct ast_state, excepthandler_type), + offsetof(struct ast_state, expr_context_type), + offsetof(struct ast_state, expr_type), + offsetof(struct ast_state, finalbody), + offsetof(struct ast_state, format_spec), + offsetof(struct ast_state, func), + offsetof(struct ast_state, generators), + offsetof(struct ast_state, guard), + offsetof(struct ast_state, handlers), + offsetof(struct ast_state, id), + offsetof(struct ast_state, ifs), + offsetof(struct ast_state, is_async), + offsetof(struct ast_state, is_lazy), + offsetof(struct ast_state, items), + offsetof(struct ast_state, iter), + offsetof(struct ast_state, key), + offsetof(struct ast_state, keys), + offsetof(struct ast_state, keyword_type), + offsetof(struct ast_state, keywords), + offsetof(struct ast_state, kind), + offsetof(struct ast_state, kw_defaults), + offsetof(struct ast_state, kwarg), + offsetof(struct ast_state, kwd_attrs), + offsetof(struct ast_state, kwd_patterns), + offsetof(struct ast_state, kwonlyargs), + offsetof(struct ast_state, left), + offsetof(struct ast_state, level), + offsetof(struct ast_state, lineno), + offsetof(struct ast_state, lower), + offsetof(struct ast_state, match_case_type), + offsetof(struct ast_state, mod_type), + offsetof(struct ast_state, module), + offsetof(struct ast_state, msg), + offsetof(struct ast_state, name), + offsetof(struct ast_state, names), + offsetof(struct ast_state, op), + offsetof(struct ast_state, operand), + offsetof(struct ast_state, operator_type), + offsetof(struct ast_state, ops), + offsetof(struct ast_state, optional_vars), + offsetof(struct ast_state, orelse), + offsetof(struct ast_state, pattern), + offsetof(struct ast_state, pattern_type), + offsetof(struct ast_state, patterns), + offsetof(struct ast_state, posonlyargs), + offsetof(struct ast_state, rest), + offsetof(struct ast_state, returns), + offsetof(struct ast_state, right), + offsetof(struct ast_state, simple), + offsetof(struct ast_state, slice), + offsetof(struct ast_state, step), + offsetof(struct ast_state, stmt_type), + offsetof(struct ast_state, str), + offsetof(struct ast_state, subject), + offsetof(struct ast_state, tag), + offsetof(struct ast_state, target), + offsetof(struct ast_state, targets), + offsetof(struct ast_state, test), + offsetof(struct ast_state, type), + offsetof(struct ast_state, type_comment), + offsetof(struct ast_state, type_ignore_type), + offsetof(struct ast_state, type_ignores), + offsetof(struct ast_state, type_param_type), + offsetof(struct ast_state, type_params), + offsetof(struct ast_state, unaryop_type), + offsetof(struct ast_state, upper), + offsetof(struct ast_state, value), + offsetof(struct ast_state, values), + offsetof(struct ast_state, vararg), + offsetof(struct ast_state, withitem_type), + }; + + for (size_t i = 0; i < Py_ARRAY_LENGTH(offsets); i++) { + PyObject **field = (PyObject **)((char *)state + offsets[i]); + Py_CLEAR(*field); + } state->finalized = 1; state->once = (_PyOnceFlag){0}; } @@ -821,4343 +827,587 @@ static const char * const TypeVarTuple_fields[]={ static int add_ast_annotations(struct ast_state *state) { - bool cond; - PyObject *Module_annotations = PyDict_New(); - if (!Module_annotations) return 0; - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Module_annotations); - return 0; - } - cond = PyDict_SetItemString(Module_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Module_annotations); - return 0; - } - } - { - PyObject *type = state->type_ignore_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Module_annotations); - return 0; - } - cond = PyDict_SetItemString(Module_annotations, "type_ignores", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Module_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Module_type, "_field_types", - Module_annotations) == 0; - if (!cond) { - Py_DECREF(Module_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Module_type, "__annotations__", - Module_annotations) == 0; - if (!cond) { - Py_DECREF(Module_annotations); - return 0; - } - Py_DECREF(Module_annotations); - PyObject *Interactive_annotations = PyDict_New(); - if (!Interactive_annotations) return 0; - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Interactive_annotations); - return 0; - } - cond = PyDict_SetItemString(Interactive_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Interactive_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Interactive_type, "_field_types", - Interactive_annotations) == 0; - if (!cond) { - Py_DECREF(Interactive_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Interactive_type, "__annotations__", - Interactive_annotations) == 0; - if (!cond) { - Py_DECREF(Interactive_annotations); - return 0; - } - Py_DECREF(Interactive_annotations); - PyObject *Expression_annotations = PyDict_New(); - if (!Expression_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Expression_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Expression_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Expression_type, "_field_types", - Expression_annotations) == 0; - if (!cond) { - Py_DECREF(Expression_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Expression_type, "__annotations__", - Expression_annotations) == 0; - if (!cond) { - Py_DECREF(Expression_annotations); - return 0; - } - Py_DECREF(Expression_annotations); - PyObject *FunctionType_annotations = PyDict_New(); - if (!FunctionType_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(FunctionType_annotations); - return 0; - } - cond = PyDict_SetItemString(FunctionType_annotations, "argtypes", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionType_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(FunctionType_annotations, "returns", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionType_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->FunctionType_type, "_field_types", - FunctionType_annotations) == 0; - if (!cond) { - Py_DECREF(FunctionType_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->FunctionType_type, "__annotations__", - FunctionType_annotations) == 0; - if (!cond) { - Py_DECREF(FunctionType_annotations); - return 0; - } - Py_DECREF(FunctionType_annotations); - PyObject *FunctionDef_annotations = PyDict_New(); - if (!FunctionDef_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(FunctionDef_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->arguments_type; - Py_INCREF(type); - cond = PyDict_SetItemString(FunctionDef_annotations, "args", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(FunctionDef_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(FunctionDef_annotations, "decorator_list", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(FunctionDef_annotations, "returns", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(FunctionDef_annotations, "type_comment", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->type_param_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(FunctionDef_annotations, "type_params", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->FunctionDef_type, "_field_types", - FunctionDef_annotations) == 0; - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->FunctionDef_type, "__annotations__", - FunctionDef_annotations) == 0; - if (!cond) { - Py_DECREF(FunctionDef_annotations); - return 0; - } - Py_DECREF(FunctionDef_annotations); - PyObject *AsyncFunctionDef_annotations = PyDict_New(); - if (!AsyncFunctionDef_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(AsyncFunctionDef_annotations, "name", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->arguments_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AsyncFunctionDef_annotations, "args", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFunctionDef_annotations, "body", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFunctionDef_annotations, - "decorator_list", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFunctionDef_annotations, "returns", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFunctionDef_annotations, - "type_comment", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - } - { - PyObject *type = state->type_param_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFunctionDef_annotations, - "type_params", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->AsyncFunctionDef_type, "_field_types", - AsyncFunctionDef_annotations) == 0; - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->AsyncFunctionDef_type, - "__annotations__", - AsyncFunctionDef_annotations) == 0; - if (!cond) { - Py_DECREF(AsyncFunctionDef_annotations); - return 0; - } - Py_DECREF(AsyncFunctionDef_annotations); - PyObject *ClassDef_annotations = PyDict_New(); - if (!ClassDef_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(ClassDef_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - cond = PyDict_SetItemString(ClassDef_annotations, "bases", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - } - { - PyObject *type = state->keyword_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - cond = PyDict_SetItemString(ClassDef_annotations, "keywords", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - cond = PyDict_SetItemString(ClassDef_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - cond = PyDict_SetItemString(ClassDef_annotations, "decorator_list", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - } - { - PyObject *type = state->type_param_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - cond = PyDict_SetItemString(ClassDef_annotations, "type_params", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->ClassDef_type, "_field_types", - ClassDef_annotations) == 0; - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->ClassDef_type, "__annotations__", - ClassDef_annotations) == 0; - if (!cond) { - Py_DECREF(ClassDef_annotations); - return 0; - } - Py_DECREF(ClassDef_annotations); - PyObject *Return_annotations = PyDict_New(); - if (!Return_annotations) return 0; - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Return_annotations); - return 0; - } - cond = PyDict_SetItemString(Return_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Return_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Return_type, "_field_types", - Return_annotations) == 0; - if (!cond) { - Py_DECREF(Return_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Return_type, "__annotations__", - Return_annotations) == 0; - if (!cond) { - Py_DECREF(Return_annotations); - return 0; - } - Py_DECREF(Return_annotations); - PyObject *Delete_annotations = PyDict_New(); - if (!Delete_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Delete_annotations); - return 0; - } - cond = PyDict_SetItemString(Delete_annotations, "targets", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Delete_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Delete_type, "_field_types", - Delete_annotations) == 0; - if (!cond) { - Py_DECREF(Delete_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Delete_type, "__annotations__", - Delete_annotations) == 0; - if (!cond) { - Py_DECREF(Delete_annotations); - return 0; - } - Py_DECREF(Delete_annotations); - PyObject *Assign_annotations = PyDict_New(); - if (!Assign_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Assign_annotations); - return 0; - } - cond = PyDict_SetItemString(Assign_annotations, "targets", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Assign_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Assign_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Assign_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Assign_annotations); - return 0; - } - cond = PyDict_SetItemString(Assign_annotations, "type_comment", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Assign_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Assign_type, "_field_types", - Assign_annotations) == 0; - if (!cond) { - Py_DECREF(Assign_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Assign_type, "__annotations__", - Assign_annotations) == 0; - if (!cond) { - Py_DECREF(Assign_annotations); - return 0; - } - Py_DECREF(Assign_annotations); - PyObject *TypeAlias_annotations = PyDict_New(); - if (!TypeAlias_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(TypeAlias_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeAlias_annotations); - return 0; - } - } - { - PyObject *type = state->type_param_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(TypeAlias_annotations); - return 0; - } - cond = PyDict_SetItemString(TypeAlias_annotations, "type_params", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeAlias_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(TypeAlias_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeAlias_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->TypeAlias_type, "_field_types", - TypeAlias_annotations) == 0; - if (!cond) { - Py_DECREF(TypeAlias_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->TypeAlias_type, "__annotations__", - TypeAlias_annotations) == 0; - if (!cond) { - Py_DECREF(TypeAlias_annotations); - return 0; - } - Py_DECREF(TypeAlias_annotations); - PyObject *AugAssign_annotations = PyDict_New(); - if (!AugAssign_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AugAssign_annotations, "target", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AugAssign_annotations); - return 0; - } - } - { - PyObject *type = state->operator_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AugAssign_annotations, "op", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AugAssign_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AugAssign_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AugAssign_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->AugAssign_type, "_field_types", - AugAssign_annotations) == 0; - if (!cond) { - Py_DECREF(AugAssign_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->AugAssign_type, "__annotations__", - AugAssign_annotations) == 0; - if (!cond) { - Py_DECREF(AugAssign_annotations); - return 0; - } - Py_DECREF(AugAssign_annotations); - PyObject *AnnAssign_annotations = PyDict_New(); - if (!AnnAssign_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AnnAssign_annotations, "target", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AnnAssign_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AnnAssign_annotations, "annotation", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AnnAssign_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(AnnAssign_annotations); - return 0; - } - cond = PyDict_SetItemString(AnnAssign_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AnnAssign_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyLong_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(AnnAssign_annotations, "simple", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AnnAssign_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->AnnAssign_type, "_field_types", - AnnAssign_annotations) == 0; - if (!cond) { - Py_DECREF(AnnAssign_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->AnnAssign_type, "__annotations__", - AnnAssign_annotations) == 0; - if (!cond) { - Py_DECREF(AnnAssign_annotations); - return 0; - } - Py_DECREF(AnnAssign_annotations); - PyObject *For_annotations = PyDict_New(); - if (!For_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(For_annotations, "target", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(For_annotations, "iter", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - cond = PyDict_SetItemString(For_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - cond = PyDict_SetItemString(For_annotations, "orelse", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - cond = PyDict_SetItemString(For_annotations, "type_comment", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->For_type, "_field_types", - For_annotations) == 0; - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->For_type, "__annotations__", - For_annotations) == 0; - if (!cond) { - Py_DECREF(For_annotations); - return 0; - } - Py_DECREF(For_annotations); - PyObject *AsyncFor_annotations = PyDict_New(); - if (!AsyncFor_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AsyncFor_annotations, "target", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(AsyncFor_annotations, "iter", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFor_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFor_annotations, "orelse", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncFor_annotations, "type_comment", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->AsyncFor_type, "_field_types", - AsyncFor_annotations) == 0; - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->AsyncFor_type, "__annotations__", - AsyncFor_annotations) == 0; - if (!cond) { - Py_DECREF(AsyncFor_annotations); - return 0; - } - Py_DECREF(AsyncFor_annotations); - PyObject *While_annotations = PyDict_New(); - if (!While_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(While_annotations, "test", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(While_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(While_annotations); - return 0; - } - cond = PyDict_SetItemString(While_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(While_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(While_annotations); - return 0; - } - cond = PyDict_SetItemString(While_annotations, "orelse", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(While_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->While_type, "_field_types", - While_annotations) == 0; - if (!cond) { - Py_DECREF(While_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->While_type, "__annotations__", - While_annotations) == 0; - if (!cond) { - Py_DECREF(While_annotations); - return 0; - } - Py_DECREF(While_annotations); - PyObject *If_annotations = PyDict_New(); - if (!If_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(If_annotations, "test", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(If_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(If_annotations); - return 0; - } - cond = PyDict_SetItemString(If_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(If_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(If_annotations); - return 0; - } - cond = PyDict_SetItemString(If_annotations, "orelse", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(If_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->If_type, "_field_types", - If_annotations) == 0; - if (!cond) { - Py_DECREF(If_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->If_type, "__annotations__", - If_annotations) == 0; - if (!cond) { - Py_DECREF(If_annotations); - return 0; - } - Py_DECREF(If_annotations); - PyObject *With_annotations = PyDict_New(); - if (!With_annotations) return 0; - { - PyObject *type = state->withitem_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(With_annotations); - return 0; - } - cond = PyDict_SetItemString(With_annotations, "items", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(With_annotations); - return 0; + enum { + FIELD_OPTIONAL = 1, + FIELD_SEQUENCE = 2, + FIELD_BUILTIN = 4, + }; + static PyTypeObject *const builtin_types[] = { + &PyUnicode_Type, + &PyLong_Type, + &PyBaseObject_Type, + }; + // Offsets refer to this interpreter's AST state, not global types. + static_assert(sizeof(struct ast_state) <= UINT16_MAX, + "ast_state offsets must fit in uint16_t"); + static const struct { + uint16_t name_offset; + uint16_t type_offset; // An index into builtin_types for builtins. + uint8_t flags; + } fields[] = { + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, type_ignores), + offsetof(struct ast_state, type_ignore_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, argtypes), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, returns), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, name), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, args), + offsetof(struct ast_state, arguments_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, decorator_list), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, returns), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, type_params), + offsetof(struct ast_state, type_param_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, name), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, args), + offsetof(struct ast_state, arguments_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, decorator_list), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, returns), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, type_params), + offsetof(struct ast_state, type_param_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, name), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, bases), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, keywords), + offsetof(struct ast_state, keyword_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, decorator_list), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, type_params), + offsetof(struct ast_state, type_param_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, targets), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, targets), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, name), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, type_params), + offsetof(struct ast_state, type_param_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, target), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, op), + offsetof(struct ast_state, operator_type), 0}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, target), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, annotation), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, simple), + 1, FIELD_BUILTIN}, + {offsetof(struct ast_state, target), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, iter), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, orelse), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, target), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, iter), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, orelse), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, test), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, orelse), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, test), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, orelse), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, items), + offsetof(struct ast_state, withitem_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, items), + offsetof(struct ast_state, withitem_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, subject), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, cases), + offsetof(struct ast_state, match_case_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, exc), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, cause), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, handlers), + offsetof(struct ast_state, excepthandler_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, orelse), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, finalbody), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, handlers), + offsetof(struct ast_state, excepthandler_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, orelse), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, finalbody), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, test), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, msg), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, names), + offsetof(struct ast_state, alias_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, is_lazy), + 1, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, module), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, names), + offsetof(struct ast_state, alias_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, level), + 1, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, is_lazy), + 1, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, names), + 0, FIELD_SEQUENCE | FIELD_BUILTIN}, + {offsetof(struct ast_state, names), + 0, FIELD_SEQUENCE | FIELD_BUILTIN}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, op), + offsetof(struct ast_state, boolop_type), 0}, + {offsetof(struct ast_state, values), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, target), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, left), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, op), + offsetof(struct ast_state, operator_type), 0}, + {offsetof(struct ast_state, right), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, op), + offsetof(struct ast_state, unaryop_type), 0}, + {offsetof(struct ast_state, operand), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, args), + offsetof(struct ast_state, arguments_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, test), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, orelse), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, keys), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, values), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, elts), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, elt), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, generators), + offsetof(struct ast_state, comprehension_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, elt), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, generators), + offsetof(struct ast_state, comprehension_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, key), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, generators), + offsetof(struct ast_state, comprehension_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, elt), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, generators), + offsetof(struct ast_state, comprehension_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, left), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, ops), + offsetof(struct ast_state, cmpop_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, comparators), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, func), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, args), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, keywords), + offsetof(struct ast_state, keyword_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, conversion), + 1, FIELD_BUILTIN}, + {offsetof(struct ast_state, format_spec), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, str), + 2, FIELD_BUILTIN}, + {offsetof(struct ast_state, conversion), + 1, FIELD_BUILTIN}, + {offsetof(struct ast_state, format_spec), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, values), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, values), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, value), + 2, FIELD_BUILTIN}, + {offsetof(struct ast_state, kind), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, attr), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, ctx), + offsetof(struct ast_state, expr_context_type), 0}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, slice), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, ctx), + offsetof(struct ast_state, expr_context_type), 0}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, ctx), + offsetof(struct ast_state, expr_context_type), 0}, + {offsetof(struct ast_state, id), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, ctx), + offsetof(struct ast_state, expr_context_type), 0}, + {offsetof(struct ast_state, elts), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, ctx), + offsetof(struct ast_state, expr_context_type), 0}, + {offsetof(struct ast_state, elts), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, ctx), + offsetof(struct ast_state, expr_context_type), 0}, + {offsetof(struct ast_state, lower), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, upper), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, step), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, target), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, iter), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, ifs), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, is_async), + 1, FIELD_BUILTIN}, + {offsetof(struct ast_state, type), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, name), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, posonlyargs), + offsetof(struct ast_state, arg_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, args), + offsetof(struct ast_state, arg_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, vararg), + offsetof(struct ast_state, arg_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, kwonlyargs), + offsetof(struct ast_state, arg_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, kw_defaults), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, kwarg), + offsetof(struct ast_state, arg_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, defaults), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, arg), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, annotation), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, type_comment), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, arg), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, name), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, asname), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, context_expr), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, optional_vars), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, pattern), + offsetof(struct ast_state, pattern_type), 0}, + {offsetof(struct ast_state, guard), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, body), + offsetof(struct ast_state, stmt_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, value), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, value), + 2, FIELD_BUILTIN}, + {offsetof(struct ast_state, patterns), + offsetof(struct ast_state, pattern_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, keys), + offsetof(struct ast_state, expr_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, patterns), + offsetof(struct ast_state, pattern_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, rest), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, cls), + offsetof(struct ast_state, expr_type), 0}, + {offsetof(struct ast_state, patterns), + offsetof(struct ast_state, pattern_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, kwd_attrs), + 0, FIELD_SEQUENCE | FIELD_BUILTIN}, + {offsetof(struct ast_state, kwd_patterns), + offsetof(struct ast_state, pattern_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, name), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, pattern), + offsetof(struct ast_state, pattern_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, name), + 0, FIELD_OPTIONAL | FIELD_BUILTIN}, + {offsetof(struct ast_state, patterns), + offsetof(struct ast_state, pattern_type), FIELD_SEQUENCE}, + {offsetof(struct ast_state, lineno), + 1, FIELD_BUILTIN}, + {offsetof(struct ast_state, tag), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, name), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, bound), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, default_value), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, name), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, default_value), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + {offsetof(struct ast_state, name), + 0, FIELD_BUILTIN}, + {offsetof(struct ast_state, default_value), + offsetof(struct ast_state, expr_type), FIELD_OPTIONAL}, + }; + static const struct { + uint16_t type_offset; + uint16_t first_field; + uint16_t nfields; + } nodes[] = { + {offsetof(struct ast_state, Module_type), 0, 2}, + {offsetof(struct ast_state, Interactive_type), 2, 1}, + {offsetof(struct ast_state, Expression_type), 3, 1}, + {offsetof(struct ast_state, FunctionType_type), 4, 2}, + {offsetof(struct ast_state, FunctionDef_type), 6, 7}, + {offsetof(struct ast_state, AsyncFunctionDef_type), 13, 7}, + {offsetof(struct ast_state, ClassDef_type), 20, 6}, + {offsetof(struct ast_state, Return_type), 26, 1}, + {offsetof(struct ast_state, Delete_type), 27, 1}, + {offsetof(struct ast_state, Assign_type), 28, 3}, + {offsetof(struct ast_state, TypeAlias_type), 31, 3}, + {offsetof(struct ast_state, AugAssign_type), 34, 3}, + {offsetof(struct ast_state, AnnAssign_type), 37, 4}, + {offsetof(struct ast_state, For_type), 41, 5}, + {offsetof(struct ast_state, AsyncFor_type), 46, 5}, + {offsetof(struct ast_state, While_type), 51, 3}, + {offsetof(struct ast_state, If_type), 54, 3}, + {offsetof(struct ast_state, With_type), 57, 3}, + {offsetof(struct ast_state, AsyncWith_type), 60, 3}, + {offsetof(struct ast_state, Match_type), 63, 2}, + {offsetof(struct ast_state, Raise_type), 65, 2}, + {offsetof(struct ast_state, Try_type), 67, 4}, + {offsetof(struct ast_state, TryStar_type), 71, 4}, + {offsetof(struct ast_state, Assert_type), 75, 2}, + {offsetof(struct ast_state, Import_type), 77, 2}, + {offsetof(struct ast_state, ImportFrom_type), 79, 4}, + {offsetof(struct ast_state, Global_type), 83, 1}, + {offsetof(struct ast_state, Nonlocal_type), 84, 1}, + {offsetof(struct ast_state, Expr_type), 85, 1}, + {offsetof(struct ast_state, Pass_type), 86, 0}, + {offsetof(struct ast_state, Break_type), 86, 0}, + {offsetof(struct ast_state, Continue_type), 86, 0}, + {offsetof(struct ast_state, BoolOp_type), 86, 2}, + {offsetof(struct ast_state, NamedExpr_type), 88, 2}, + {offsetof(struct ast_state, BinOp_type), 90, 3}, + {offsetof(struct ast_state, UnaryOp_type), 93, 2}, + {offsetof(struct ast_state, Lambda_type), 95, 2}, + {offsetof(struct ast_state, IfExp_type), 97, 3}, + {offsetof(struct ast_state, Dict_type), 100, 2}, + {offsetof(struct ast_state, Set_type), 102, 1}, + {offsetof(struct ast_state, ListComp_type), 103, 2}, + {offsetof(struct ast_state, SetComp_type), 105, 2}, + {offsetof(struct ast_state, DictComp_type), 107, 3}, + {offsetof(struct ast_state, GeneratorExp_type), 110, 2}, + {offsetof(struct ast_state, Await_type), 112, 1}, + {offsetof(struct ast_state, Yield_type), 113, 1}, + {offsetof(struct ast_state, YieldFrom_type), 114, 1}, + {offsetof(struct ast_state, Compare_type), 115, 3}, + {offsetof(struct ast_state, Call_type), 118, 3}, + {offsetof(struct ast_state, FormattedValue_type), 121, 3}, + {offsetof(struct ast_state, Interpolation_type), 124, 4}, + {offsetof(struct ast_state, JoinedStr_type), 128, 1}, + {offsetof(struct ast_state, TemplateStr_type), 129, 1}, + {offsetof(struct ast_state, Constant_type), 130, 2}, + {offsetof(struct ast_state, Attribute_type), 132, 3}, + {offsetof(struct ast_state, Subscript_type), 135, 3}, + {offsetof(struct ast_state, Starred_type), 138, 2}, + {offsetof(struct ast_state, Name_type), 140, 2}, + {offsetof(struct ast_state, List_type), 142, 2}, + {offsetof(struct ast_state, Tuple_type), 144, 2}, + {offsetof(struct ast_state, Slice_type), 146, 3}, + {offsetof(struct ast_state, Load_type), 149, 0}, + {offsetof(struct ast_state, Store_type), 149, 0}, + {offsetof(struct ast_state, Del_type), 149, 0}, + {offsetof(struct ast_state, And_type), 149, 0}, + {offsetof(struct ast_state, Or_type), 149, 0}, + {offsetof(struct ast_state, Add_type), 149, 0}, + {offsetof(struct ast_state, Sub_type), 149, 0}, + {offsetof(struct ast_state, Mult_type), 149, 0}, + {offsetof(struct ast_state, MatMult_type), 149, 0}, + {offsetof(struct ast_state, Div_type), 149, 0}, + {offsetof(struct ast_state, Mod_type), 149, 0}, + {offsetof(struct ast_state, Pow_type), 149, 0}, + {offsetof(struct ast_state, LShift_type), 149, 0}, + {offsetof(struct ast_state, RShift_type), 149, 0}, + {offsetof(struct ast_state, BitOr_type), 149, 0}, + {offsetof(struct ast_state, BitXor_type), 149, 0}, + {offsetof(struct ast_state, BitAnd_type), 149, 0}, + {offsetof(struct ast_state, FloorDiv_type), 149, 0}, + {offsetof(struct ast_state, Invert_type), 149, 0}, + {offsetof(struct ast_state, Not_type), 149, 0}, + {offsetof(struct ast_state, UAdd_type), 149, 0}, + {offsetof(struct ast_state, USub_type), 149, 0}, + {offsetof(struct ast_state, Eq_type), 149, 0}, + {offsetof(struct ast_state, NotEq_type), 149, 0}, + {offsetof(struct ast_state, Lt_type), 149, 0}, + {offsetof(struct ast_state, LtE_type), 149, 0}, + {offsetof(struct ast_state, Gt_type), 149, 0}, + {offsetof(struct ast_state, GtE_type), 149, 0}, + {offsetof(struct ast_state, Is_type), 149, 0}, + {offsetof(struct ast_state, IsNot_type), 149, 0}, + {offsetof(struct ast_state, In_type), 149, 0}, + {offsetof(struct ast_state, NotIn_type), 149, 0}, + {offsetof(struct ast_state, comprehension_type), 149, 4}, + {offsetof(struct ast_state, ExceptHandler_type), 153, 3}, + {offsetof(struct ast_state, arguments_type), 156, 7}, + {offsetof(struct ast_state, arg_type), 163, 3}, + {offsetof(struct ast_state, keyword_type), 166, 2}, + {offsetof(struct ast_state, alias_type), 168, 2}, + {offsetof(struct ast_state, withitem_type), 170, 2}, + {offsetof(struct ast_state, match_case_type), 172, 3}, + {offsetof(struct ast_state, MatchValue_type), 175, 1}, + {offsetof(struct ast_state, MatchSingleton_type), 176, 1}, + {offsetof(struct ast_state, MatchSequence_type), 177, 1}, + {offsetof(struct ast_state, MatchMapping_type), 178, 3}, + {offsetof(struct ast_state, MatchClass_type), 181, 4}, + {offsetof(struct ast_state, MatchStar_type), 185, 1}, + {offsetof(struct ast_state, MatchAs_type), 186, 2}, + {offsetof(struct ast_state, MatchOr_type), 188, 1}, + {offsetof(struct ast_state, TypeIgnore_type), 189, 2}, + {offsetof(struct ast_state, TypeVar_type), 191, 3}, + {offsetof(struct ast_state, ParamSpec_type), 194, 2}, + {offsetof(struct ast_state, TypeVarTuple_type), 196, 2}, + }; + char *base = (char *)state; + PyObject *annotations = NULL; + for (size_t i = 0; i < Py_ARRAY_LENGTH(nodes); i++) { + annotations = PyDict_New(); + if (annotations == NULL) { + goto error; } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(With_annotations); - return 0; + size_t end = nodes[i].first_field + nodes[i].nfields; + for (size_t j = nodes[i].first_field; j < end; j++) { + PyObject *name = *(PyObject **)(base + fields[j].name_offset); + PyObject *type; + if (fields[j].flags & FIELD_BUILTIN) { + type = (PyObject *)builtin_types[fields[j].type_offset]; + } + else { + type = *(PyObject **)(base + fields[j].type_offset); + } + if (fields[j].flags & FIELD_OPTIONAL) { + type = _Py_union_type_or(type, Py_None); + } + else if (fields[j].flags & FIELD_SEQUENCE) { + type = Py_GenericAlias((PyObject *)&PyList_Type, type); + } + else { + Py_INCREF(type); + } + if (type == NULL) { + goto error; + } + int res = PyDict_SetItem(annotations, name, type); + Py_DECREF(type); + if (res < 0) { + goto error; + } } - cond = PyDict_SetItemString(With_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(With_annotations); - return 0; + PyObject *node = *(PyObject **)(base + nodes[i].type_offset); + if (PyObject_SetAttrString(node, "_field_types", annotations) < 0 || + PyObject_SetAttrString(node, "__annotations__", annotations) < 0) + { + goto error; } + Py_CLEAR(annotations); } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(With_annotations); - return 0; - } - cond = PyDict_SetItemString(With_annotations, "type_comment", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(With_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->With_type, "_field_types", - With_annotations) == 0; - if (!cond) { - Py_DECREF(With_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->With_type, "__annotations__", - With_annotations) == 0; - if (!cond) { - Py_DECREF(With_annotations); - return 0; - } - Py_DECREF(With_annotations); - PyObject *AsyncWith_annotations = PyDict_New(); - if (!AsyncWith_annotations) return 0; - { - PyObject *type = state->withitem_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncWith_annotations, "items", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncWith_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - cond = PyDict_SetItemString(AsyncWith_annotations, "type_comment", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->AsyncWith_type, "_field_types", - AsyncWith_annotations) == 0; - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->AsyncWith_type, "__annotations__", - AsyncWith_annotations) == 0; - if (!cond) { - Py_DECREF(AsyncWith_annotations); - return 0; - } - Py_DECREF(AsyncWith_annotations); - PyObject *Match_annotations = PyDict_New(); - if (!Match_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Match_annotations, "subject", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Match_annotations); - return 0; - } - } - { - PyObject *type = state->match_case_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Match_annotations); - return 0; - } - cond = PyDict_SetItemString(Match_annotations, "cases", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Match_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Match_type, "_field_types", - Match_annotations) == 0; - if (!cond) { - Py_DECREF(Match_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Match_type, "__annotations__", - Match_annotations) == 0; - if (!cond) { - Py_DECREF(Match_annotations); - return 0; - } - Py_DECREF(Match_annotations); - PyObject *Raise_annotations = PyDict_New(); - if (!Raise_annotations) return 0; - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Raise_annotations); - return 0; - } - cond = PyDict_SetItemString(Raise_annotations, "exc", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Raise_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Raise_annotations); - return 0; - } - cond = PyDict_SetItemString(Raise_annotations, "cause", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Raise_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Raise_type, "_field_types", - Raise_annotations) == 0; - if (!cond) { - Py_DECREF(Raise_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Raise_type, "__annotations__", - Raise_annotations) == 0; - if (!cond) { - Py_DECREF(Raise_annotations); - return 0; - } - Py_DECREF(Raise_annotations); - PyObject *Try_annotations = PyDict_New(); - if (!Try_annotations) return 0; - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - cond = PyDict_SetItemString(Try_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - } - { - PyObject *type = state->excepthandler_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - cond = PyDict_SetItemString(Try_annotations, "handlers", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - cond = PyDict_SetItemString(Try_annotations, "orelse", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - cond = PyDict_SetItemString(Try_annotations, "finalbody", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Try_type, "_field_types", - Try_annotations) == 0; - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Try_type, "__annotations__", - Try_annotations) == 0; - if (!cond) { - Py_DECREF(Try_annotations); - return 0; - } - Py_DECREF(Try_annotations); - PyObject *TryStar_annotations = PyDict_New(); - if (!TryStar_annotations) return 0; - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - cond = PyDict_SetItemString(TryStar_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - } - { - PyObject *type = state->excepthandler_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - cond = PyDict_SetItemString(TryStar_annotations, "handlers", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - cond = PyDict_SetItemString(TryStar_annotations, "orelse", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - cond = PyDict_SetItemString(TryStar_annotations, "finalbody", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->TryStar_type, "_field_types", - TryStar_annotations) == 0; - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->TryStar_type, "__annotations__", - TryStar_annotations) == 0; - if (!cond) { - Py_DECREF(TryStar_annotations); - return 0; - } - Py_DECREF(TryStar_annotations); - PyObject *Assert_annotations = PyDict_New(); - if (!Assert_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Assert_annotations, "test", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Assert_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Assert_annotations); - return 0; - } - cond = PyDict_SetItemString(Assert_annotations, "msg", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Assert_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Assert_type, "_field_types", - Assert_annotations) == 0; - if (!cond) { - Py_DECREF(Assert_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Assert_type, "__annotations__", - Assert_annotations) == 0; - if (!cond) { - Py_DECREF(Assert_annotations); - return 0; - } - Py_DECREF(Assert_annotations); - PyObject *Import_annotations = PyDict_New(); - if (!Import_annotations) return 0; - { - PyObject *type = state->alias_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Import_annotations); - return 0; - } - cond = PyDict_SetItemString(Import_annotations, "names", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Import_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyLong_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Import_annotations); - return 0; - } - cond = PyDict_SetItemString(Import_annotations, "is_lazy", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Import_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Import_type, "_field_types", - Import_annotations) == 0; - if (!cond) { - Py_DECREF(Import_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Import_type, "__annotations__", - Import_annotations) == 0; - if (!cond) { - Py_DECREF(Import_annotations); - return 0; - } - Py_DECREF(Import_annotations); - PyObject *ImportFrom_annotations = PyDict_New(); - if (!ImportFrom_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - cond = PyDict_SetItemString(ImportFrom_annotations, "module", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - } - { - PyObject *type = state->alias_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - cond = PyDict_SetItemString(ImportFrom_annotations, "names", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyLong_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - cond = PyDict_SetItemString(ImportFrom_annotations, "level", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyLong_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - cond = PyDict_SetItemString(ImportFrom_annotations, "is_lazy", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->ImportFrom_type, "_field_types", - ImportFrom_annotations) == 0; - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->ImportFrom_type, "__annotations__", - ImportFrom_annotations) == 0; - if (!cond) { - Py_DECREF(ImportFrom_annotations); - return 0; - } - Py_DECREF(ImportFrom_annotations); - PyObject *Global_annotations = PyDict_New(); - if (!Global_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Global_annotations); - return 0; - } - cond = PyDict_SetItemString(Global_annotations, "names", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Global_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Global_type, "_field_types", - Global_annotations) == 0; - if (!cond) { - Py_DECREF(Global_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Global_type, "__annotations__", - Global_annotations) == 0; - if (!cond) { - Py_DECREF(Global_annotations); - return 0; - } - Py_DECREF(Global_annotations); - PyObject *Nonlocal_annotations = PyDict_New(); - if (!Nonlocal_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Nonlocal_annotations); - return 0; - } - cond = PyDict_SetItemString(Nonlocal_annotations, "names", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Nonlocal_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Nonlocal_type, "_field_types", - Nonlocal_annotations) == 0; - if (!cond) { - Py_DECREF(Nonlocal_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Nonlocal_type, "__annotations__", - Nonlocal_annotations) == 0; - if (!cond) { - Py_DECREF(Nonlocal_annotations); - return 0; - } - Py_DECREF(Nonlocal_annotations); - PyObject *Expr_annotations = PyDict_New(); - if (!Expr_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Expr_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Expr_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Expr_type, "_field_types", - Expr_annotations) == 0; - if (!cond) { - Py_DECREF(Expr_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Expr_type, "__annotations__", - Expr_annotations) == 0; - if (!cond) { - Py_DECREF(Expr_annotations); - return 0; - } - Py_DECREF(Expr_annotations); - PyObject *Pass_annotations = PyDict_New(); - if (!Pass_annotations) return 0; - cond = PyObject_SetAttrString(state->Pass_type, "_field_types", - Pass_annotations) == 0; - if (!cond) { - Py_DECREF(Pass_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Pass_type, "__annotations__", - Pass_annotations) == 0; - if (!cond) { - Py_DECREF(Pass_annotations); - return 0; - } - Py_DECREF(Pass_annotations); - PyObject *Break_annotations = PyDict_New(); - if (!Break_annotations) return 0; - cond = PyObject_SetAttrString(state->Break_type, "_field_types", - Break_annotations) == 0; - if (!cond) { - Py_DECREF(Break_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Break_type, "__annotations__", - Break_annotations) == 0; - if (!cond) { - Py_DECREF(Break_annotations); - return 0; - } - Py_DECREF(Break_annotations); - PyObject *Continue_annotations = PyDict_New(); - if (!Continue_annotations) return 0; - cond = PyObject_SetAttrString(state->Continue_type, "_field_types", - Continue_annotations) == 0; - if (!cond) { - Py_DECREF(Continue_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Continue_type, "__annotations__", - Continue_annotations) == 0; - if (!cond) { - Py_DECREF(Continue_annotations); - return 0; - } - Py_DECREF(Continue_annotations); - PyObject *BoolOp_annotations = PyDict_New(); - if (!BoolOp_annotations) return 0; - { - PyObject *type = state->boolop_type; - Py_INCREF(type); - cond = PyDict_SetItemString(BoolOp_annotations, "op", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(BoolOp_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(BoolOp_annotations); - return 0; - } - cond = PyDict_SetItemString(BoolOp_annotations, "values", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(BoolOp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->BoolOp_type, "_field_types", - BoolOp_annotations) == 0; - if (!cond) { - Py_DECREF(BoolOp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->BoolOp_type, "__annotations__", - BoolOp_annotations) == 0; - if (!cond) { - Py_DECREF(BoolOp_annotations); - return 0; - } - Py_DECREF(BoolOp_annotations); - PyObject *NamedExpr_annotations = PyDict_New(); - if (!NamedExpr_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(NamedExpr_annotations, "target", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(NamedExpr_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(NamedExpr_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(NamedExpr_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->NamedExpr_type, "_field_types", - NamedExpr_annotations) == 0; - if (!cond) { - Py_DECREF(NamedExpr_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->NamedExpr_type, "__annotations__", - NamedExpr_annotations) == 0; - if (!cond) { - Py_DECREF(NamedExpr_annotations); - return 0; - } - Py_DECREF(NamedExpr_annotations); - PyObject *BinOp_annotations = PyDict_New(); - if (!BinOp_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(BinOp_annotations, "left", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(BinOp_annotations); - return 0; - } - } - { - PyObject *type = state->operator_type; - Py_INCREF(type); - cond = PyDict_SetItemString(BinOp_annotations, "op", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(BinOp_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(BinOp_annotations, "right", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(BinOp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->BinOp_type, "_field_types", - BinOp_annotations) == 0; - if (!cond) { - Py_DECREF(BinOp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->BinOp_type, "__annotations__", - BinOp_annotations) == 0; - if (!cond) { - Py_DECREF(BinOp_annotations); - return 0; - } - Py_DECREF(BinOp_annotations); - PyObject *UnaryOp_annotations = PyDict_New(); - if (!UnaryOp_annotations) return 0; - { - PyObject *type = state->unaryop_type; - Py_INCREF(type); - cond = PyDict_SetItemString(UnaryOp_annotations, "op", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(UnaryOp_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(UnaryOp_annotations, "operand", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(UnaryOp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->UnaryOp_type, "_field_types", - UnaryOp_annotations) == 0; - if (!cond) { - Py_DECREF(UnaryOp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->UnaryOp_type, "__annotations__", - UnaryOp_annotations) == 0; - if (!cond) { - Py_DECREF(UnaryOp_annotations); - return 0; - } - Py_DECREF(UnaryOp_annotations); - PyObject *Lambda_annotations = PyDict_New(); - if (!Lambda_annotations) return 0; - { - PyObject *type = state->arguments_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Lambda_annotations, "args", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Lambda_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Lambda_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Lambda_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Lambda_type, "_field_types", - Lambda_annotations) == 0; - if (!cond) { - Py_DECREF(Lambda_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Lambda_type, "__annotations__", - Lambda_annotations) == 0; - if (!cond) { - Py_DECREF(Lambda_annotations); - return 0; - } - Py_DECREF(Lambda_annotations); - PyObject *IfExp_annotations = PyDict_New(); - if (!IfExp_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(IfExp_annotations, "test", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(IfExp_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(IfExp_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(IfExp_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(IfExp_annotations, "orelse", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(IfExp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->IfExp_type, "_field_types", - IfExp_annotations) == 0; - if (!cond) { - Py_DECREF(IfExp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->IfExp_type, "__annotations__", - IfExp_annotations) == 0; - if (!cond) { - Py_DECREF(IfExp_annotations); - return 0; - } - Py_DECREF(IfExp_annotations); - PyObject *Dict_annotations = PyDict_New(); - if (!Dict_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Dict_annotations); - return 0; - } - cond = PyDict_SetItemString(Dict_annotations, "keys", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Dict_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Dict_annotations); - return 0; - } - cond = PyDict_SetItemString(Dict_annotations, "values", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Dict_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Dict_type, "_field_types", - Dict_annotations) == 0; - if (!cond) { - Py_DECREF(Dict_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Dict_type, "__annotations__", - Dict_annotations) == 0; - if (!cond) { - Py_DECREF(Dict_annotations); - return 0; - } - Py_DECREF(Dict_annotations); - PyObject *Set_annotations = PyDict_New(); - if (!Set_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Set_annotations); - return 0; - } - cond = PyDict_SetItemString(Set_annotations, "elts", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Set_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Set_type, "_field_types", - Set_annotations) == 0; - if (!cond) { - Py_DECREF(Set_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Set_type, "__annotations__", - Set_annotations) == 0; - if (!cond) { - Py_DECREF(Set_annotations); - return 0; - } - Py_DECREF(Set_annotations); - PyObject *ListComp_annotations = PyDict_New(); - if (!ListComp_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(ListComp_annotations, "elt", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ListComp_annotations); - return 0; - } - } - { - PyObject *type = state->comprehension_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ListComp_annotations); - return 0; - } - cond = PyDict_SetItemString(ListComp_annotations, "generators", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ListComp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->ListComp_type, "_field_types", - ListComp_annotations) == 0; - if (!cond) { - Py_DECREF(ListComp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->ListComp_type, "__annotations__", - ListComp_annotations) == 0; - if (!cond) { - Py_DECREF(ListComp_annotations); - return 0; - } - Py_DECREF(ListComp_annotations); - PyObject *SetComp_annotations = PyDict_New(); - if (!SetComp_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(SetComp_annotations, "elt", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(SetComp_annotations); - return 0; - } - } - { - PyObject *type = state->comprehension_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(SetComp_annotations); - return 0; - } - cond = PyDict_SetItemString(SetComp_annotations, "generators", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(SetComp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->SetComp_type, "_field_types", - SetComp_annotations) == 0; - if (!cond) { - Py_DECREF(SetComp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->SetComp_type, "__annotations__", - SetComp_annotations) == 0; - if (!cond) { - Py_DECREF(SetComp_annotations); - return 0; - } - Py_DECREF(SetComp_annotations); - PyObject *DictComp_annotations = PyDict_New(); - if (!DictComp_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(DictComp_annotations, "key", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(DictComp_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(DictComp_annotations); - return 0; - } - cond = PyDict_SetItemString(DictComp_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(DictComp_annotations); - return 0; - } - } - { - PyObject *type = state->comprehension_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(DictComp_annotations); - return 0; - } - cond = PyDict_SetItemString(DictComp_annotations, "generators", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(DictComp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->DictComp_type, "_field_types", - DictComp_annotations) == 0; - if (!cond) { - Py_DECREF(DictComp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->DictComp_type, "__annotations__", - DictComp_annotations) == 0; - if (!cond) { - Py_DECREF(DictComp_annotations); - return 0; - } - Py_DECREF(DictComp_annotations); - PyObject *GeneratorExp_annotations = PyDict_New(); - if (!GeneratorExp_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(GeneratorExp_annotations, "elt", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(GeneratorExp_annotations); - return 0; - } - } - { - PyObject *type = state->comprehension_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(GeneratorExp_annotations); - return 0; - } - cond = PyDict_SetItemString(GeneratorExp_annotations, "generators", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(GeneratorExp_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->GeneratorExp_type, "_field_types", - GeneratorExp_annotations) == 0; - if (!cond) { - Py_DECREF(GeneratorExp_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->GeneratorExp_type, "__annotations__", - GeneratorExp_annotations) == 0; - if (!cond) { - Py_DECREF(GeneratorExp_annotations); - return 0; - } - Py_DECREF(GeneratorExp_annotations); - PyObject *Await_annotations = PyDict_New(); - if (!Await_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Await_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Await_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Await_type, "_field_types", - Await_annotations) == 0; - if (!cond) { - Py_DECREF(Await_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Await_type, "__annotations__", - Await_annotations) == 0; - if (!cond) { - Py_DECREF(Await_annotations); - return 0; - } - Py_DECREF(Await_annotations); - PyObject *Yield_annotations = PyDict_New(); - if (!Yield_annotations) return 0; - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Yield_annotations); - return 0; - } - cond = PyDict_SetItemString(Yield_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Yield_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Yield_type, "_field_types", - Yield_annotations) == 0; - if (!cond) { - Py_DECREF(Yield_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Yield_type, "__annotations__", - Yield_annotations) == 0; - if (!cond) { - Py_DECREF(Yield_annotations); - return 0; - } - Py_DECREF(Yield_annotations); - PyObject *YieldFrom_annotations = PyDict_New(); - if (!YieldFrom_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(YieldFrom_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(YieldFrom_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->YieldFrom_type, "_field_types", - YieldFrom_annotations) == 0; - if (!cond) { - Py_DECREF(YieldFrom_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->YieldFrom_type, "__annotations__", - YieldFrom_annotations) == 0; - if (!cond) { - Py_DECREF(YieldFrom_annotations); - return 0; - } - Py_DECREF(YieldFrom_annotations); - PyObject *Compare_annotations = PyDict_New(); - if (!Compare_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Compare_annotations, "left", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Compare_annotations); - return 0; - } - } - { - PyObject *type = state->cmpop_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Compare_annotations); - return 0; - } - cond = PyDict_SetItemString(Compare_annotations, "ops", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Compare_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Compare_annotations); - return 0; - } - cond = PyDict_SetItemString(Compare_annotations, "comparators", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Compare_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Compare_type, "_field_types", - Compare_annotations) == 0; - if (!cond) { - Py_DECREF(Compare_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Compare_type, "__annotations__", - Compare_annotations) == 0; - if (!cond) { - Py_DECREF(Compare_annotations); - return 0; - } - Py_DECREF(Compare_annotations); - PyObject *Call_annotations = PyDict_New(); - if (!Call_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Call_annotations, "func", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Call_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Call_annotations); - return 0; - } - cond = PyDict_SetItemString(Call_annotations, "args", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Call_annotations); - return 0; - } - } - { - PyObject *type = state->keyword_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Call_annotations); - return 0; - } - cond = PyDict_SetItemString(Call_annotations, "keywords", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Call_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Call_type, "_field_types", - Call_annotations) == 0; - if (!cond) { - Py_DECREF(Call_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Call_type, "__annotations__", - Call_annotations) == 0; - if (!cond) { - Py_DECREF(Call_annotations); - return 0; - } - Py_DECREF(Call_annotations); - PyObject *FormattedValue_annotations = PyDict_New(); - if (!FormattedValue_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(FormattedValue_annotations, "value", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FormattedValue_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyLong_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(FormattedValue_annotations, "conversion", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FormattedValue_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(FormattedValue_annotations); - return 0; - } - cond = PyDict_SetItemString(FormattedValue_annotations, "format_spec", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(FormattedValue_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->FormattedValue_type, "_field_types", - FormattedValue_annotations) == 0; - if (!cond) { - Py_DECREF(FormattedValue_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->FormattedValue_type, - "__annotations__", - FormattedValue_annotations) == 0; - if (!cond) { - Py_DECREF(FormattedValue_annotations); - return 0; - } - Py_DECREF(FormattedValue_annotations); - PyObject *Interpolation_annotations = PyDict_New(); - if (!Interpolation_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Interpolation_annotations, "value", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Interpolation_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyBaseObject_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(Interpolation_annotations, "str", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Interpolation_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyLong_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(Interpolation_annotations, "conversion", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Interpolation_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Interpolation_annotations); - return 0; - } - cond = PyDict_SetItemString(Interpolation_annotations, "format_spec", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Interpolation_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Interpolation_type, "_field_types", - Interpolation_annotations) == 0; - if (!cond) { - Py_DECREF(Interpolation_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Interpolation_type, "__annotations__", - Interpolation_annotations) == 0; - if (!cond) { - Py_DECREF(Interpolation_annotations); - return 0; - } - Py_DECREF(Interpolation_annotations); - PyObject *JoinedStr_annotations = PyDict_New(); - if (!JoinedStr_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(JoinedStr_annotations); - return 0; - } - cond = PyDict_SetItemString(JoinedStr_annotations, "values", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(JoinedStr_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->JoinedStr_type, "_field_types", - JoinedStr_annotations) == 0; - if (!cond) { - Py_DECREF(JoinedStr_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->JoinedStr_type, "__annotations__", - JoinedStr_annotations) == 0; - if (!cond) { - Py_DECREF(JoinedStr_annotations); - return 0; - } - Py_DECREF(JoinedStr_annotations); - PyObject *TemplateStr_annotations = PyDict_New(); - if (!TemplateStr_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(TemplateStr_annotations); - return 0; - } - cond = PyDict_SetItemString(TemplateStr_annotations, "values", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TemplateStr_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->TemplateStr_type, "_field_types", - TemplateStr_annotations) == 0; - if (!cond) { - Py_DECREF(TemplateStr_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->TemplateStr_type, "__annotations__", - TemplateStr_annotations) == 0; - if (!cond) { - Py_DECREF(TemplateStr_annotations); - return 0; - } - Py_DECREF(TemplateStr_annotations); - PyObject *Constant_annotations = PyDict_New(); - if (!Constant_annotations) return 0; - { - PyObject *type = (PyObject *)&PyBaseObject_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(Constant_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Constant_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Constant_annotations); - return 0; - } - cond = PyDict_SetItemString(Constant_annotations, "kind", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Constant_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Constant_type, "_field_types", - Constant_annotations) == 0; - if (!cond) { - Py_DECREF(Constant_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Constant_type, "__annotations__", - Constant_annotations) == 0; - if (!cond) { - Py_DECREF(Constant_annotations); - return 0; - } - Py_DECREF(Constant_annotations); - PyObject *Attribute_annotations = PyDict_New(); - if (!Attribute_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Attribute_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Attribute_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(Attribute_annotations, "attr", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Attribute_annotations); - return 0; - } - } - { - PyObject *type = state->expr_context_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Attribute_annotations, "ctx", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Attribute_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Attribute_type, "_field_types", - Attribute_annotations) == 0; - if (!cond) { - Py_DECREF(Attribute_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Attribute_type, "__annotations__", - Attribute_annotations) == 0; - if (!cond) { - Py_DECREF(Attribute_annotations); - return 0; - } - Py_DECREF(Attribute_annotations); - PyObject *Subscript_annotations = PyDict_New(); - if (!Subscript_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Subscript_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Subscript_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Subscript_annotations, "slice", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Subscript_annotations); - return 0; - } - } - { - PyObject *type = state->expr_context_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Subscript_annotations, "ctx", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Subscript_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Subscript_type, "_field_types", - Subscript_annotations) == 0; - if (!cond) { - Py_DECREF(Subscript_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Subscript_type, "__annotations__", - Subscript_annotations) == 0; - if (!cond) { - Py_DECREF(Subscript_annotations); - return 0; - } - Py_DECREF(Subscript_annotations); - PyObject *Starred_annotations = PyDict_New(); - if (!Starred_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Starred_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Starred_annotations); - return 0; - } - } - { - PyObject *type = state->expr_context_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Starred_annotations, "ctx", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Starred_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Starred_type, "_field_types", - Starred_annotations) == 0; - if (!cond) { - Py_DECREF(Starred_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Starred_type, "__annotations__", - Starred_annotations) == 0; - if (!cond) { - Py_DECREF(Starred_annotations); - return 0; - } - Py_DECREF(Starred_annotations); - PyObject *Name_annotations = PyDict_New(); - if (!Name_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(Name_annotations, "id", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Name_annotations); - return 0; - } - } - { - PyObject *type = state->expr_context_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Name_annotations, "ctx", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Name_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Name_type, "_field_types", - Name_annotations) == 0; - if (!cond) { - Py_DECREF(Name_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Name_type, "__annotations__", - Name_annotations) == 0; - if (!cond) { - Py_DECREF(Name_annotations); - return 0; - } - Py_DECREF(Name_annotations); - PyObject *List_annotations = PyDict_New(); - if (!List_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(List_annotations); - return 0; - } - cond = PyDict_SetItemString(List_annotations, "elts", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(List_annotations); - return 0; - } - } - { - PyObject *type = state->expr_context_type; - Py_INCREF(type); - cond = PyDict_SetItemString(List_annotations, "ctx", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(List_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->List_type, "_field_types", - List_annotations) == 0; - if (!cond) { - Py_DECREF(List_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->List_type, "__annotations__", - List_annotations) == 0; - if (!cond) { - Py_DECREF(List_annotations); - return 0; - } - Py_DECREF(List_annotations); - PyObject *Tuple_annotations = PyDict_New(); - if (!Tuple_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(Tuple_annotations); - return 0; - } - cond = PyDict_SetItemString(Tuple_annotations, "elts", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Tuple_annotations); - return 0; - } - } - { - PyObject *type = state->expr_context_type; - Py_INCREF(type); - cond = PyDict_SetItemString(Tuple_annotations, "ctx", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Tuple_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Tuple_type, "_field_types", - Tuple_annotations) == 0; - if (!cond) { - Py_DECREF(Tuple_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Tuple_type, "__annotations__", - Tuple_annotations) == 0; - if (!cond) { - Py_DECREF(Tuple_annotations); - return 0; - } - Py_DECREF(Tuple_annotations); - PyObject *Slice_annotations = PyDict_New(); - if (!Slice_annotations) return 0; - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - cond = PyDict_SetItemString(Slice_annotations, "lower", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - cond = PyDict_SetItemString(Slice_annotations, "upper", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - cond = PyDict_SetItemString(Slice_annotations, "step", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->Slice_type, "_field_types", - Slice_annotations) == 0; - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Slice_type, "__annotations__", - Slice_annotations) == 0; - if (!cond) { - Py_DECREF(Slice_annotations); - return 0; - } - Py_DECREF(Slice_annotations); - PyObject *Load_annotations = PyDict_New(); - if (!Load_annotations) return 0; - cond = PyObject_SetAttrString(state->Load_type, "_field_types", - Load_annotations) == 0; - if (!cond) { - Py_DECREF(Load_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Load_type, "__annotations__", - Load_annotations) == 0; - if (!cond) { - Py_DECREF(Load_annotations); - return 0; - } - Py_DECREF(Load_annotations); - PyObject *Store_annotations = PyDict_New(); - if (!Store_annotations) return 0; - cond = PyObject_SetAttrString(state->Store_type, "_field_types", - Store_annotations) == 0; - if (!cond) { - Py_DECREF(Store_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Store_type, "__annotations__", - Store_annotations) == 0; - if (!cond) { - Py_DECREF(Store_annotations); - return 0; - } - Py_DECREF(Store_annotations); - PyObject *Del_annotations = PyDict_New(); - if (!Del_annotations) return 0; - cond = PyObject_SetAttrString(state->Del_type, "_field_types", - Del_annotations) == 0; - if (!cond) { - Py_DECREF(Del_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Del_type, "__annotations__", - Del_annotations) == 0; - if (!cond) { - Py_DECREF(Del_annotations); - return 0; - } - Py_DECREF(Del_annotations); - PyObject *And_annotations = PyDict_New(); - if (!And_annotations) return 0; - cond = PyObject_SetAttrString(state->And_type, "_field_types", - And_annotations) == 0; - if (!cond) { - Py_DECREF(And_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->And_type, "__annotations__", - And_annotations) == 0; - if (!cond) { - Py_DECREF(And_annotations); - return 0; - } - Py_DECREF(And_annotations); - PyObject *Or_annotations = PyDict_New(); - if (!Or_annotations) return 0; - cond = PyObject_SetAttrString(state->Or_type, "_field_types", - Or_annotations) == 0; - if (!cond) { - Py_DECREF(Or_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Or_type, "__annotations__", - Or_annotations) == 0; - if (!cond) { - Py_DECREF(Or_annotations); - return 0; - } - Py_DECREF(Or_annotations); - PyObject *Add_annotations = PyDict_New(); - if (!Add_annotations) return 0; - cond = PyObject_SetAttrString(state->Add_type, "_field_types", - Add_annotations) == 0; - if (!cond) { - Py_DECREF(Add_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Add_type, "__annotations__", - Add_annotations) == 0; - if (!cond) { - Py_DECREF(Add_annotations); - return 0; - } - Py_DECREF(Add_annotations); - PyObject *Sub_annotations = PyDict_New(); - if (!Sub_annotations) return 0; - cond = PyObject_SetAttrString(state->Sub_type, "_field_types", - Sub_annotations) == 0; - if (!cond) { - Py_DECREF(Sub_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Sub_type, "__annotations__", - Sub_annotations) == 0; - if (!cond) { - Py_DECREF(Sub_annotations); - return 0; - } - Py_DECREF(Sub_annotations); - PyObject *Mult_annotations = PyDict_New(); - if (!Mult_annotations) return 0; - cond = PyObject_SetAttrString(state->Mult_type, "_field_types", - Mult_annotations) == 0; - if (!cond) { - Py_DECREF(Mult_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Mult_type, "__annotations__", - Mult_annotations) == 0; - if (!cond) { - Py_DECREF(Mult_annotations); - return 0; - } - Py_DECREF(Mult_annotations); - PyObject *MatMult_annotations = PyDict_New(); - if (!MatMult_annotations) return 0; - cond = PyObject_SetAttrString(state->MatMult_type, "_field_types", - MatMult_annotations) == 0; - if (!cond) { - Py_DECREF(MatMult_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatMult_type, "__annotations__", - MatMult_annotations) == 0; - if (!cond) { - Py_DECREF(MatMult_annotations); - return 0; - } - Py_DECREF(MatMult_annotations); - PyObject *Div_annotations = PyDict_New(); - if (!Div_annotations) return 0; - cond = PyObject_SetAttrString(state->Div_type, "_field_types", - Div_annotations) == 0; - if (!cond) { - Py_DECREF(Div_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Div_type, "__annotations__", - Div_annotations) == 0; - if (!cond) { - Py_DECREF(Div_annotations); - return 0; - } - Py_DECREF(Div_annotations); - PyObject *Mod_annotations = PyDict_New(); - if (!Mod_annotations) return 0; - cond = PyObject_SetAttrString(state->Mod_type, "_field_types", - Mod_annotations) == 0; - if (!cond) { - Py_DECREF(Mod_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Mod_type, "__annotations__", - Mod_annotations) == 0; - if (!cond) { - Py_DECREF(Mod_annotations); - return 0; - } - Py_DECREF(Mod_annotations); - PyObject *Pow_annotations = PyDict_New(); - if (!Pow_annotations) return 0; - cond = PyObject_SetAttrString(state->Pow_type, "_field_types", - Pow_annotations) == 0; - if (!cond) { - Py_DECREF(Pow_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Pow_type, "__annotations__", - Pow_annotations) == 0; - if (!cond) { - Py_DECREF(Pow_annotations); - return 0; - } - Py_DECREF(Pow_annotations); - PyObject *LShift_annotations = PyDict_New(); - if (!LShift_annotations) return 0; - cond = PyObject_SetAttrString(state->LShift_type, "_field_types", - LShift_annotations) == 0; - if (!cond) { - Py_DECREF(LShift_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->LShift_type, "__annotations__", - LShift_annotations) == 0; - if (!cond) { - Py_DECREF(LShift_annotations); - return 0; - } - Py_DECREF(LShift_annotations); - PyObject *RShift_annotations = PyDict_New(); - if (!RShift_annotations) return 0; - cond = PyObject_SetAttrString(state->RShift_type, "_field_types", - RShift_annotations) == 0; - if (!cond) { - Py_DECREF(RShift_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->RShift_type, "__annotations__", - RShift_annotations) == 0; - if (!cond) { - Py_DECREF(RShift_annotations); - return 0; - } - Py_DECREF(RShift_annotations); - PyObject *BitOr_annotations = PyDict_New(); - if (!BitOr_annotations) return 0; - cond = PyObject_SetAttrString(state->BitOr_type, "_field_types", - BitOr_annotations) == 0; - if (!cond) { - Py_DECREF(BitOr_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->BitOr_type, "__annotations__", - BitOr_annotations) == 0; - if (!cond) { - Py_DECREF(BitOr_annotations); - return 0; - } - Py_DECREF(BitOr_annotations); - PyObject *BitXor_annotations = PyDict_New(); - if (!BitXor_annotations) return 0; - cond = PyObject_SetAttrString(state->BitXor_type, "_field_types", - BitXor_annotations) == 0; - if (!cond) { - Py_DECREF(BitXor_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->BitXor_type, "__annotations__", - BitXor_annotations) == 0; - if (!cond) { - Py_DECREF(BitXor_annotations); - return 0; - } - Py_DECREF(BitXor_annotations); - PyObject *BitAnd_annotations = PyDict_New(); - if (!BitAnd_annotations) return 0; - cond = PyObject_SetAttrString(state->BitAnd_type, "_field_types", - BitAnd_annotations) == 0; - if (!cond) { - Py_DECREF(BitAnd_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->BitAnd_type, "__annotations__", - BitAnd_annotations) == 0; - if (!cond) { - Py_DECREF(BitAnd_annotations); - return 0; - } - Py_DECREF(BitAnd_annotations); - PyObject *FloorDiv_annotations = PyDict_New(); - if (!FloorDiv_annotations) return 0; - cond = PyObject_SetAttrString(state->FloorDiv_type, "_field_types", - FloorDiv_annotations) == 0; - if (!cond) { - Py_DECREF(FloorDiv_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->FloorDiv_type, "__annotations__", - FloorDiv_annotations) == 0; - if (!cond) { - Py_DECREF(FloorDiv_annotations); - return 0; - } - Py_DECREF(FloorDiv_annotations); - PyObject *Invert_annotations = PyDict_New(); - if (!Invert_annotations) return 0; - cond = PyObject_SetAttrString(state->Invert_type, "_field_types", - Invert_annotations) == 0; - if (!cond) { - Py_DECREF(Invert_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Invert_type, "__annotations__", - Invert_annotations) == 0; - if (!cond) { - Py_DECREF(Invert_annotations); - return 0; - } - Py_DECREF(Invert_annotations); - PyObject *Not_annotations = PyDict_New(); - if (!Not_annotations) return 0; - cond = PyObject_SetAttrString(state->Not_type, "_field_types", - Not_annotations) == 0; - if (!cond) { - Py_DECREF(Not_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Not_type, "__annotations__", - Not_annotations) == 0; - if (!cond) { - Py_DECREF(Not_annotations); - return 0; - } - Py_DECREF(Not_annotations); - PyObject *UAdd_annotations = PyDict_New(); - if (!UAdd_annotations) return 0; - cond = PyObject_SetAttrString(state->UAdd_type, "_field_types", - UAdd_annotations) == 0; - if (!cond) { - Py_DECREF(UAdd_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->UAdd_type, "__annotations__", - UAdd_annotations) == 0; - if (!cond) { - Py_DECREF(UAdd_annotations); - return 0; - } - Py_DECREF(UAdd_annotations); - PyObject *USub_annotations = PyDict_New(); - if (!USub_annotations) return 0; - cond = PyObject_SetAttrString(state->USub_type, "_field_types", - USub_annotations) == 0; - if (!cond) { - Py_DECREF(USub_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->USub_type, "__annotations__", - USub_annotations) == 0; - if (!cond) { - Py_DECREF(USub_annotations); - return 0; - } - Py_DECREF(USub_annotations); - PyObject *Eq_annotations = PyDict_New(); - if (!Eq_annotations) return 0; - cond = PyObject_SetAttrString(state->Eq_type, "_field_types", - Eq_annotations) == 0; - if (!cond) { - Py_DECREF(Eq_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Eq_type, "__annotations__", - Eq_annotations) == 0; - if (!cond) { - Py_DECREF(Eq_annotations); - return 0; - } - Py_DECREF(Eq_annotations); - PyObject *NotEq_annotations = PyDict_New(); - if (!NotEq_annotations) return 0; - cond = PyObject_SetAttrString(state->NotEq_type, "_field_types", - NotEq_annotations) == 0; - if (!cond) { - Py_DECREF(NotEq_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->NotEq_type, "__annotations__", - NotEq_annotations) == 0; - if (!cond) { - Py_DECREF(NotEq_annotations); - return 0; - } - Py_DECREF(NotEq_annotations); - PyObject *Lt_annotations = PyDict_New(); - if (!Lt_annotations) return 0; - cond = PyObject_SetAttrString(state->Lt_type, "_field_types", - Lt_annotations) == 0; - if (!cond) { - Py_DECREF(Lt_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Lt_type, "__annotations__", - Lt_annotations) == 0; - if (!cond) { - Py_DECREF(Lt_annotations); - return 0; - } - Py_DECREF(Lt_annotations); - PyObject *LtE_annotations = PyDict_New(); - if (!LtE_annotations) return 0; - cond = PyObject_SetAttrString(state->LtE_type, "_field_types", - LtE_annotations) == 0; - if (!cond) { - Py_DECREF(LtE_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->LtE_type, "__annotations__", - LtE_annotations) == 0; - if (!cond) { - Py_DECREF(LtE_annotations); - return 0; - } - Py_DECREF(LtE_annotations); - PyObject *Gt_annotations = PyDict_New(); - if (!Gt_annotations) return 0; - cond = PyObject_SetAttrString(state->Gt_type, "_field_types", - Gt_annotations) == 0; - if (!cond) { - Py_DECREF(Gt_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Gt_type, "__annotations__", - Gt_annotations) == 0; - if (!cond) { - Py_DECREF(Gt_annotations); - return 0; - } - Py_DECREF(Gt_annotations); - PyObject *GtE_annotations = PyDict_New(); - if (!GtE_annotations) return 0; - cond = PyObject_SetAttrString(state->GtE_type, "_field_types", - GtE_annotations) == 0; - if (!cond) { - Py_DECREF(GtE_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->GtE_type, "__annotations__", - GtE_annotations) == 0; - if (!cond) { - Py_DECREF(GtE_annotations); - return 0; - } - Py_DECREF(GtE_annotations); - PyObject *Is_annotations = PyDict_New(); - if (!Is_annotations) return 0; - cond = PyObject_SetAttrString(state->Is_type, "_field_types", - Is_annotations) == 0; - if (!cond) { - Py_DECREF(Is_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->Is_type, "__annotations__", - Is_annotations) == 0; - if (!cond) { - Py_DECREF(Is_annotations); - return 0; - } - Py_DECREF(Is_annotations); - PyObject *IsNot_annotations = PyDict_New(); - if (!IsNot_annotations) return 0; - cond = PyObject_SetAttrString(state->IsNot_type, "_field_types", - IsNot_annotations) == 0; - if (!cond) { - Py_DECREF(IsNot_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->IsNot_type, "__annotations__", - IsNot_annotations) == 0; - if (!cond) { - Py_DECREF(IsNot_annotations); - return 0; - } - Py_DECREF(IsNot_annotations); - PyObject *In_annotations = PyDict_New(); - if (!In_annotations) return 0; - cond = PyObject_SetAttrString(state->In_type, "_field_types", - In_annotations) == 0; - if (!cond) { - Py_DECREF(In_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->In_type, "__annotations__", - In_annotations) == 0; - if (!cond) { - Py_DECREF(In_annotations); - return 0; - } - Py_DECREF(In_annotations); - PyObject *NotIn_annotations = PyDict_New(); - if (!NotIn_annotations) return 0; - cond = PyObject_SetAttrString(state->NotIn_type, "_field_types", - NotIn_annotations) == 0; - if (!cond) { - Py_DECREF(NotIn_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->NotIn_type, "__annotations__", - NotIn_annotations) == 0; - if (!cond) { - Py_DECREF(NotIn_annotations); - return 0; - } - Py_DECREF(NotIn_annotations); - PyObject *comprehension_annotations = PyDict_New(); - if (!comprehension_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(comprehension_annotations, "target", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(comprehension_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(comprehension_annotations, "iter", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(comprehension_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(comprehension_annotations); - return 0; - } - cond = PyDict_SetItemString(comprehension_annotations, "ifs", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(comprehension_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyLong_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(comprehension_annotations, "is_async", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(comprehension_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->comprehension_type, "_field_types", - comprehension_annotations) == 0; - if (!cond) { - Py_DECREF(comprehension_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->comprehension_type, "__annotations__", - comprehension_annotations) == 0; - if (!cond) { - Py_DECREF(comprehension_annotations); - return 0; - } - Py_DECREF(comprehension_annotations); - PyObject *ExceptHandler_annotations = PyDict_New(); - if (!ExceptHandler_annotations) return 0; - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - cond = PyDict_SetItemString(ExceptHandler_annotations, "type", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - cond = PyDict_SetItemString(ExceptHandler_annotations, "name", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - cond = PyDict_SetItemString(ExceptHandler_annotations, "body", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->ExceptHandler_type, "_field_types", - ExceptHandler_annotations) == 0; - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->ExceptHandler_type, "__annotations__", - ExceptHandler_annotations) == 0; - if (!cond) { - Py_DECREF(ExceptHandler_annotations); - return 0; - } - Py_DECREF(ExceptHandler_annotations); - PyObject *arguments_annotations = PyDict_New(); - if (!arguments_annotations) return 0; - { - PyObject *type = state->arg_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyDict_SetItemString(arguments_annotations, "posonlyargs", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - } - { - PyObject *type = state->arg_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyDict_SetItemString(arguments_annotations, "args", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - } - { - PyObject *type = state->arg_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyDict_SetItemString(arguments_annotations, "vararg", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - } - { - PyObject *type = state->arg_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyDict_SetItemString(arguments_annotations, "kwonlyargs", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyDict_SetItemString(arguments_annotations, "kw_defaults", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - } - { - PyObject *type = state->arg_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyDict_SetItemString(arguments_annotations, "kwarg", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyDict_SetItemString(arguments_annotations, "defaults", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->arguments_type, "_field_types", - arguments_annotations) == 0; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->arguments_type, "__annotations__", - arguments_annotations) == 0; - if (!cond) { - Py_DECREF(arguments_annotations); - return 0; - } - Py_DECREF(arguments_annotations); - PyObject *arg_annotations = PyDict_New(); - if (!arg_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(arg_annotations, "arg", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arg_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(arg_annotations); - return 0; - } - cond = PyDict_SetItemString(arg_annotations, "annotation", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arg_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(arg_annotations); - return 0; - } - cond = PyDict_SetItemString(arg_annotations, "type_comment", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(arg_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->arg_type, "_field_types", - arg_annotations) == 0; - if (!cond) { - Py_DECREF(arg_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->arg_type, "__annotations__", - arg_annotations) == 0; - if (!cond) { - Py_DECREF(arg_annotations); - return 0; - } - Py_DECREF(arg_annotations); - PyObject *keyword_annotations = PyDict_New(); - if (!keyword_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(keyword_annotations); - return 0; - } - cond = PyDict_SetItemString(keyword_annotations, "arg", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(keyword_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(keyword_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(keyword_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->keyword_type, "_field_types", - keyword_annotations) == 0; - if (!cond) { - Py_DECREF(keyword_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->keyword_type, "__annotations__", - keyword_annotations) == 0; - if (!cond) { - Py_DECREF(keyword_annotations); - return 0; - } - Py_DECREF(keyword_annotations); - PyObject *alias_annotations = PyDict_New(); - if (!alias_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(alias_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(alias_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(alias_annotations); - return 0; - } - cond = PyDict_SetItemString(alias_annotations, "asname", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(alias_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->alias_type, "_field_types", - alias_annotations) == 0; - if (!cond) { - Py_DECREF(alias_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->alias_type, "__annotations__", - alias_annotations) == 0; - if (!cond) { - Py_DECREF(alias_annotations); - return 0; - } - Py_DECREF(alias_annotations); - PyObject *withitem_annotations = PyDict_New(); - if (!withitem_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(withitem_annotations, "context_expr", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(withitem_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(withitem_annotations); - return 0; - } - cond = PyDict_SetItemString(withitem_annotations, "optional_vars", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(withitem_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->withitem_type, "_field_types", - withitem_annotations) == 0; - if (!cond) { - Py_DECREF(withitem_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->withitem_type, "__annotations__", - withitem_annotations) == 0; - if (!cond) { - Py_DECREF(withitem_annotations); - return 0; - } - Py_DECREF(withitem_annotations); - PyObject *match_case_annotations = PyDict_New(); - if (!match_case_annotations) return 0; - { - PyObject *type = state->pattern_type; - Py_INCREF(type); - cond = PyDict_SetItemString(match_case_annotations, "pattern", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(match_case_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(match_case_annotations); - return 0; - } - cond = PyDict_SetItemString(match_case_annotations, "guard", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(match_case_annotations); - return 0; - } - } - { - PyObject *type = state->stmt_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(match_case_annotations); - return 0; - } - cond = PyDict_SetItemString(match_case_annotations, "body", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(match_case_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->match_case_type, "_field_types", - match_case_annotations) == 0; - if (!cond) { - Py_DECREF(match_case_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->match_case_type, "__annotations__", - match_case_annotations) == 0; - if (!cond) { - Py_DECREF(match_case_annotations); - return 0; - } - Py_DECREF(match_case_annotations); - PyObject *MatchValue_annotations = PyDict_New(); - if (!MatchValue_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(MatchValue_annotations, "value", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchValue_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchValue_type, "_field_types", - MatchValue_annotations) == 0; - if (!cond) { - Py_DECREF(MatchValue_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchValue_type, "__annotations__", - MatchValue_annotations) == 0; - if (!cond) { - Py_DECREF(MatchValue_annotations); - return 0; - } - Py_DECREF(MatchValue_annotations); - PyObject *MatchSingleton_annotations = PyDict_New(); - if (!MatchSingleton_annotations) return 0; - { - PyObject *type = (PyObject *)&PyBaseObject_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(MatchSingleton_annotations, "value", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchSingleton_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchSingleton_type, "_field_types", - MatchSingleton_annotations) == 0; - if (!cond) { - Py_DECREF(MatchSingleton_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchSingleton_type, - "__annotations__", - MatchSingleton_annotations) == 0; - if (!cond) { - Py_DECREF(MatchSingleton_annotations); - return 0; - } - Py_DECREF(MatchSingleton_annotations); - PyObject *MatchSequence_annotations = PyDict_New(); - if (!MatchSequence_annotations) return 0; - { - PyObject *type = state->pattern_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchSequence_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchSequence_annotations, "patterns", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchSequence_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchSequence_type, "_field_types", - MatchSequence_annotations) == 0; - if (!cond) { - Py_DECREF(MatchSequence_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchSequence_type, "__annotations__", - MatchSequence_annotations) == 0; - if (!cond) { - Py_DECREF(MatchSequence_annotations); - return 0; - } - Py_DECREF(MatchSequence_annotations); - PyObject *MatchMapping_annotations = PyDict_New(); - if (!MatchMapping_annotations) return 0; - { - PyObject *type = state->expr_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchMapping_annotations, "keys", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - } - { - PyObject *type = state->pattern_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchMapping_annotations, "patterns", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchMapping_annotations, "rest", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchMapping_type, "_field_types", - MatchMapping_annotations) == 0; - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchMapping_type, "__annotations__", - MatchMapping_annotations) == 0; - if (!cond) { - Py_DECREF(MatchMapping_annotations); - return 0; - } - Py_DECREF(MatchMapping_annotations); - PyObject *MatchClass_annotations = PyDict_New(); - if (!MatchClass_annotations) return 0; - { - PyObject *type = state->expr_type; - Py_INCREF(type); - cond = PyDict_SetItemString(MatchClass_annotations, "cls", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - } - { - PyObject *type = state->pattern_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchClass_annotations, "patterns", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchClass_annotations, "kwd_attrs", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - } - { - PyObject *type = state->pattern_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchClass_annotations, "kwd_patterns", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchClass_type, "_field_types", - MatchClass_annotations) == 0; - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchClass_type, "__annotations__", - MatchClass_annotations) == 0; - if (!cond) { - Py_DECREF(MatchClass_annotations); - return 0; - } - Py_DECREF(MatchClass_annotations); - PyObject *MatchStar_annotations = PyDict_New(); - if (!MatchStar_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchStar_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchStar_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchStar_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchStar_type, "_field_types", - MatchStar_annotations) == 0; - if (!cond) { - Py_DECREF(MatchStar_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchStar_type, "__annotations__", - MatchStar_annotations) == 0; - if (!cond) { - Py_DECREF(MatchStar_annotations); - return 0; - } - Py_DECREF(MatchStar_annotations); - PyObject *MatchAs_annotations = PyDict_New(); - if (!MatchAs_annotations) return 0; - { - PyObject *type = state->pattern_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchAs_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchAs_annotations, "pattern", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchAs_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchAs_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchAs_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchAs_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchAs_type, "_field_types", - MatchAs_annotations) == 0; - if (!cond) { - Py_DECREF(MatchAs_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchAs_type, "__annotations__", - MatchAs_annotations) == 0; - if (!cond) { - Py_DECREF(MatchAs_annotations); - return 0; - } - Py_DECREF(MatchAs_annotations); - PyObject *MatchOr_annotations = PyDict_New(); - if (!MatchOr_annotations) return 0; - { - PyObject *type = state->pattern_type; - type = Py_GenericAlias((PyObject *)&PyList_Type, type); - cond = type != NULL; - if (!cond) { - Py_DECREF(MatchOr_annotations); - return 0; - } - cond = PyDict_SetItemString(MatchOr_annotations, "patterns", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(MatchOr_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->MatchOr_type, "_field_types", - MatchOr_annotations) == 0; - if (!cond) { - Py_DECREF(MatchOr_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->MatchOr_type, "__annotations__", - MatchOr_annotations) == 0; - if (!cond) { - Py_DECREF(MatchOr_annotations); - return 0; - } - Py_DECREF(MatchOr_annotations); - PyObject *TypeIgnore_annotations = PyDict_New(); - if (!TypeIgnore_annotations) return 0; - { - PyObject *type = (PyObject *)&PyLong_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(TypeIgnore_annotations, "lineno", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeIgnore_annotations); - return 0; - } - } - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(TypeIgnore_annotations, "tag", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeIgnore_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->TypeIgnore_type, "_field_types", - TypeIgnore_annotations) == 0; - if (!cond) { - Py_DECREF(TypeIgnore_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->TypeIgnore_type, "__annotations__", - TypeIgnore_annotations) == 0; - if (!cond) { - Py_DECREF(TypeIgnore_annotations); - return 0; - } - Py_DECREF(TypeIgnore_annotations); - PyObject *TypeVar_annotations = PyDict_New(); - if (!TypeVar_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(TypeVar_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeVar_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(TypeVar_annotations); - return 0; - } - cond = PyDict_SetItemString(TypeVar_annotations, "bound", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeVar_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(TypeVar_annotations); - return 0; - } - cond = PyDict_SetItemString(TypeVar_annotations, "default_value", type) - == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeVar_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->TypeVar_type, "_field_types", - TypeVar_annotations) == 0; - if (!cond) { - Py_DECREF(TypeVar_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->TypeVar_type, "__annotations__", - TypeVar_annotations) == 0; - if (!cond) { - Py_DECREF(TypeVar_annotations); - return 0; - } - Py_DECREF(TypeVar_annotations); - PyObject *ParamSpec_annotations = PyDict_New(); - if (!ParamSpec_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(ParamSpec_annotations, "name", type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ParamSpec_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(ParamSpec_annotations); - return 0; - } - cond = PyDict_SetItemString(ParamSpec_annotations, "default_value", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(ParamSpec_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->ParamSpec_type, "_field_types", - ParamSpec_annotations) == 0; - if (!cond) { - Py_DECREF(ParamSpec_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->ParamSpec_type, "__annotations__", - ParamSpec_annotations) == 0; - if (!cond) { - Py_DECREF(ParamSpec_annotations); - return 0; - } - Py_DECREF(ParamSpec_annotations); - PyObject *TypeVarTuple_annotations = PyDict_New(); - if (!TypeVarTuple_annotations) return 0; - { - PyObject *type = (PyObject *)&PyUnicode_Type; - Py_INCREF(type); - cond = PyDict_SetItemString(TypeVarTuple_annotations, "name", type) == - 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeVarTuple_annotations); - return 0; - } - } - { - PyObject *type = state->expr_type; - type = _Py_union_type_or(type, Py_None); - cond = type != NULL; - if (!cond) { - Py_DECREF(TypeVarTuple_annotations); - return 0; - } - cond = PyDict_SetItemString(TypeVarTuple_annotations, "default_value", - type) == 0; - Py_DECREF(type); - if (!cond) { - Py_DECREF(TypeVarTuple_annotations); - return 0; - } - } - cond = PyObject_SetAttrString(state->TypeVarTuple_type, "_field_types", - TypeVarTuple_annotations) == 0; - if (!cond) { - Py_DECREF(TypeVarTuple_annotations); - return 0; - } - cond = PyObject_SetAttrString(state->TypeVarTuple_type, "__annotations__", - TypeVarTuple_annotations) == 0; - if (!cond) { - Py_DECREF(TypeVarTuple_annotations); - return 0; - } - Py_DECREF(TypeVarTuple_annotations); - return 1; +error: + Py_XDECREF(annotations); + return 0; } diff --git a/Python/brc.c b/Python/brc.c index d27687052aec19..aeef74b922b86e 100644 --- a/Python/brc.c +++ b/Python/brc.c @@ -48,6 +48,28 @@ find_thread_state(struct _brc_bucket *bucket, uintptr_t thread_id) return NULL; } +// Merge the refcounts of all objects in `stack`, keeping the queue's reference. +static void +merge_queued_refcounts(_PyObjectStack *stack) +{ + for (_PyObjectStackChunk *buf = stack->head; buf != NULL; buf = buf->prev) { + for (Py_ssize_t i = 0; i < buf->n; i++) { + _Py_ExplicitMergeRefcount(buf->objs[i], 0); + } + } +} + +// Release the queue's reference to each merged object. This may run +// destructors, so the bucket mutex must not be held. +static void +decref_merged_objects(_PyObjectStack *stack) +{ + PyObject *ob; + while ((ob = _PyObjectStack_Pop(stack)) != NULL) { + Py_DECREF(ob); + } +} + // Enqueue an object to be merged by the owning thread. This steals a // reference to the object. void @@ -93,6 +115,22 @@ _Py_brc_queue_object(PyObject *ob) return; } + if (_PyThreadState_TrySuspendDetached(&tstate->base)) { + // The owning thread is detached (e.g. blocked on a lock or in a + // system call) and may not run Python code again for a long time, + // so merge its queue on its behalf instead of waiting for it. While + // it is held in the "suspended" state it cannot attach and therefore + // cannot touch ob_ref_local or ob_tid. + _PyObjectStack merged = {0}; + _PyObjectStack_Merge(&merged, &tstate->brc.objects_to_merge); + merge_queued_refcounts(&merged); + _PyThreadState_ResumeDetached(&tstate->base); + PyMutex_Unlock(&bucket->mutex); + + decref_merged_objects(&merged); + return; + } + // Notify owning thread _Py_set_eval_breaker_bit(&tstate->base, _PY_EVAL_EXPLICIT_MERGE_BIT); diff --git a/Python/initconfig.c b/Python/initconfig.c index 49f1beb37bb920..ac0845b892903c 100644 --- a/Python/initconfig.c +++ b/Python/initconfig.c @@ -712,13 +712,17 @@ _Py_COMP_DIAG_POP char* Py_GETENV(const char *name) { -_Py_COMP_DIAG_PUSH -_Py_COMP_DIAG_IGNORE_DEPR_DECLS - if (Py_IgnoreEnvironmentFlag) { + int use_environment = 1; + PyThreadState *tstate = PyThreadState_GetUnchecked(); + if (tstate != NULL) { + const PyConfig *config = &tstate->interp->config; + use_environment = config->use_environment; + } + + if (!use_environment) { return NULL; } return getenv(name); -_Py_COMP_DIAG_POP } /* --- PyStatus ----------------------------------------------- */ diff --git a/Python/pystate.c b/Python/pystate.c index 9a2dc9431f8bb2..75bb7520c9ec8c 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -2380,6 +2380,27 @@ _PyThreadState_SetShuttingDown(PyThreadState *tstate) #endif } +#ifdef Py_GIL_DISABLED +int +_PyThreadState_TrySuspendDetached(PyThreadState *tstate) +{ + assert(tstate != _PyThreadState_GET()); + int expected = _Py_THREAD_DETACHED; + return _Py_atomic_compare_exchange_int(&tstate->state, &expected, + _Py_THREAD_SUSPENDED); +} + +void +_PyThreadState_ResumeDetached(PyThreadState *tstate) +{ + assert(tstate != _PyThreadState_GET()); + assert(_Py_atomic_load_int_relaxed(&tstate->state) == _Py_THREAD_SUSPENDED); + _Py_atomic_store_int(&tstate->state, _Py_THREAD_DETACHED); + // Wake the thread if it is parked in tstate_wait_attach(). + _PyParkingLot_UnparkAll(&tstate->state); +} +#endif + // Decrease stop-the-world counter of remaining number of threads that need to // pause. If we are the final thread to pause, notify the requesting thread. static void diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 03e5ac7415beb9..b3ec8461485de1 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -4540,9 +4540,16 @@ PySys_SetArgvEx(int argc, wchar_t **argv, int updatepath) void PySys_SetArgv(int argc, wchar_t **argv) { + int isolated = 0; + PyThreadState *tstate = PyThreadState_GetUnchecked(); + if (tstate != NULL) { + const PyConfig *config = &tstate->interp->config; + isolated = config->isolated; + } + _Py_COMP_DIAG_PUSH _Py_COMP_DIAG_IGNORE_DEPR_DECLS - PySys_SetArgvEx(argc, argv, Py_IsolatedFlag == 0); + PySys_SetArgvEx(argc, argv, isolated == 0); _Py_COMP_DIAG_POP } diff --git a/Tools/build/generate_global_objects.py b/Tools/build/generate_global_objects.py index 573d7171b142d1..86a8d9711e666a 100644 --- a/Tools/build/generate_global_objects.py +++ b/Tools/build/generate_global_objects.py @@ -401,19 +401,20 @@ def generate_static_strings_initializer(identifiers, strings): printer.write(START) printer.write("static inline void") with printer.block("_PyUnicode_InitStaticStrings(PyInterpreterState *interp)"): - printer.write(f'PyObject *string;') - for i in sorted(identifiers): - # This use of _Py_ID() is ignored by iter_global_strings() - # since iter_files() ignores .h files. - printer.write(f'string = &_Py_ID({i});') - printer.write(f'_PyUnicode_InternStatic(interp, &string);') - printer.write(f'assert(_PyUnicode_CheckConsistency(string, 1));') - printer.write(f'assert(PyUnicode_GET_LENGTH(string) != 1);') - for value, name in sorted(strings.items()): - printer.write(f'string = &_Py_STR({name});') - printer.write(f'_PyUnicode_InternStatic(interp, &string);') - printer.write(f'assert(_PyUnicode_CheckConsistency(string, 1));') - printer.write(f'assert(PyUnicode_GET_LENGTH(string) != 1);') + printer.write('// Offsets avoid a pointer relocation for each string.') + with printer.block('static const uint32_t offsets[] =', ';'): + for i in sorted(identifiers): + printer.write('offsetof(struct _Py_global_strings, ' + f'identifiers._py_{i}._ascii.ob_base),') + for value, name in sorted(strings.items()): + printer.write('offsetof(struct _Py_global_strings, ' + f'literals._py_{name}._ascii.ob_base),') + printer.write('char *base = (char *)&_Py_SINGLETON(strings);') + with printer.block('for (size_t i = 0; i < Py_ARRAY_LENGTH(offsets); i++)'): + printer.write('PyObject *string = (PyObject *)(base + offsets[i]);') + printer.write('_PyUnicode_InternStatic(interp, &string);') + printer.write('assert(_PyUnicode_CheckConsistency(string, 1));') + printer.write('assert(PyUnicode_GET_LENGTH(string) != 1);') printer.write(END) printer.write(after) diff --git a/Tools/c-analyzer/cpython/_parser.py b/Tools/c-analyzer/cpython/_parser.py index 1d062c57a43013..3c715f91cede10 100644 --- a/Tools/c-analyzer/cpython/_parser.py +++ b/Tools/c-analyzer/cpython/_parser.py @@ -319,7 +319,7 @@ def format_tsv_lines(lines): _abs('Modules/_remote_debugging/*.h'): (20_000, 1000), _abs('Modules/_testcapimodule.c'): (20_000, 400), _abs('Modules/_testclinic.c'): (20_000, 400), - _abs('Modules/expat/expat.h'): (10_000, 400), + _abs('Modules/expat/expat.h'): (10_000, 500), _abs('Objects/stringlib/unicode_format.h'): (10_000, 400), _abs('Objects/typeobject.c'): (380_000, 13_000), _abs('Python/compile.c'): (20_000, 500), @@ -335,6 +335,8 @@ def format_tsv_lines(lines): _abs('Include/internal/pycore_opcode.h'): (10_000, 1000), _abs('Include/internal/pycore_global_strings.h'): (5_000, 1000), _abs('Include/internal/pycore_runtime_init_generated.h'): (5_000, 1000), + _abs('Include/internal/pycore_unicodeobject_generated.h'): (100_000, 1500), + _abs('Python/Python-ast.c'): (20_000, 500), _abs('Python/deepfreeze/*.c'): (20_000, 500), _abs('Python/frozen_modules/*.h'): (20_000, 500), _abs('Python/opcode_targets.h'): (10_000, 500), diff --git a/Tools/c-analyzer/cpython/ignored.tsv b/Tools/c-analyzer/cpython/ignored.tsv index cddfeb02c4b859..60ff561776b76d 100644 --- a/Tools/c-analyzer/cpython/ignored.tsv +++ b/Tools/c-analyzer/cpython/ignored.tsv @@ -365,6 +365,7 @@ Objects/unicodeobject.c unicode_translate_call_errorhandler argparse - Parser/parser.c - reserved_keywords - Parser/parser.c - soft_keywords - Parser/lexer/lexer.c - type_comment_prefix - +Python/Python-ast.c add_ast_annotations builtin_types const array of pointers to static builtin types Python/ceval.c - _PyEval_BinaryOps - Python/ceval.c - _Py_INTERPRETER_TRAMPOLINE_INSTRUCTIONS - Python/ceval.c - _Py_INTERPRETER_TRAMPOLINE_INSTRUCTIONS_PTR -