2022-02-08 16:39:07 -04:00
|
|
|
#ifndef Py_INTERNAL_GLOBAL_STRINGS_H
|
|
|
|
#define Py_INTERNAL_GLOBAL_STRINGS_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef Py_BUILD_CORE
|
|
|
|
# error "this header requires Py_BUILD_CORE define"
|
|
|
|
#endif
|
|
|
|
|
2022-10-17 07:01:00 -03:00
|
|
|
// The data structure & init here are inspired by Tools/build/deepfreeze.py.
|
2022-02-08 16:39:07 -04:00
|
|
|
|
|
|
|
// All field names generated by ASCII_STR() have a common prefix,
|
2022-11-07 16:06:23 -04:00
|
|
|
// to help avoid collisions with keywords, macros, etc.
|
2022-02-08 16:39:07 -04:00
|
|
|
|
|
|
|
#define STRUCT_FOR_ASCII_STR(LITERAL) \
|
|
|
|
struct { \
|
|
|
|
PyASCIIObject _ascii; \
|
|
|
|
uint8_t _data[sizeof(LITERAL)]; \
|
|
|
|
}
|
|
|
|
#define STRUCT_FOR_STR(NAME, LITERAL) \
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ASCII_STR(LITERAL) _py_ ## NAME;
|
2022-02-08 16:39:07 -04:00
|
|
|
#define STRUCT_FOR_ID(NAME) \
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ASCII_STR(#NAME) _py_ ## NAME;
|
2022-02-08 16:39:07 -04:00
|
|
|
|
|
|
|
// XXX Order by frequency of use?
|
|
|
|
|
2022-10-17 07:01:00 -03:00
|
|
|
/* The following is auto-generated by Tools/build/generate_global_objects.py. */
|
2022-02-08 16:39:07 -04:00
|
|
|
struct _Py_global_strings {
|
|
|
|
struct {
|
|
|
|
STRUCT_FOR_STR(anon_dictcomp, "<dictcomp>")
|
|
|
|
STRUCT_FOR_STR(anon_genexpr, "<genexpr>")
|
|
|
|
STRUCT_FOR_STR(anon_lambda, "<lambda>")
|
|
|
|
STRUCT_FOR_STR(anon_listcomp, "<listcomp>")
|
|
|
|
STRUCT_FOR_STR(anon_module, "<module>")
|
2023-08-10 09:34:00 -03:00
|
|
|
STRUCT_FOR_STR(anon_null, "<NULL>")
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_STR(anon_setcomp, "<setcomp>")
|
|
|
|
STRUCT_FOR_STR(anon_string, "<string>")
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_STR(anon_unknown, "<unknown>")
|
|
|
|
STRUCT_FOR_STR(dbl_close_br, "}}")
|
|
|
|
STRUCT_FOR_STR(dbl_open_br, "{{")
|
2022-02-14 20:36:51 -04:00
|
|
|
STRUCT_FOR_STR(dbl_percent, "%%")
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_STR(defaults, ".defaults")
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_STR(dot_locals, ".<locals>")
|
2022-02-14 20:36:51 -04:00
|
|
|
STRUCT_FOR_STR(empty, "")
|
2024-06-11 10:06:49 -03:00
|
|
|
STRUCT_FOR_STR(format, ".format")
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_STR(generic_base, ".generic_base")
|
2022-11-02 13:03:38 -03:00
|
|
|
STRUCT_FOR_STR(json_decoder, "json.decoder")
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_STR(kwdefaults, ".kwdefaults")
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_STR(list_err, "list index out of range")
|
2024-10-10 17:21:29 -03:00
|
|
|
STRUCT_FOR_STR(str_replace_inf, "1e309")
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_STR(type_params, ".type_params")
|
2022-04-03 23:46:57 -03:00
|
|
|
STRUCT_FOR_STR(utf_8, "utf-8")
|
2022-02-08 16:39:07 -04:00
|
|
|
} literals;
|
|
|
|
|
|
|
|
struct {
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(CANCELLED)
|
|
|
|
STRUCT_FOR_ID(FINISHED)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(False)
|
2022-11-02 13:03:38 -03:00
|
|
|
STRUCT_FOR_ID(JSONDecodeError)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(PENDING)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(Py_Repr)
|
|
|
|
STRUCT_FOR_ID(TextIOWrapper)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(True)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(WarningMessage)
|
2023-02-15 09:07:59 -04:00
|
|
|
STRUCT_FOR_ID(_WindowsConsoleIO)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__IOBase_closed)
|
|
|
|
STRUCT_FOR_ID(__abc_tpflags__)
|
|
|
|
STRUCT_FOR_ID(__abs__)
|
|
|
|
STRUCT_FOR_ID(__abstractmethods__)
|
|
|
|
STRUCT_FOR_ID(__add__)
|
|
|
|
STRUCT_FOR_ID(__aenter__)
|
|
|
|
STRUCT_FOR_ID(__aexit__)
|
|
|
|
STRUCT_FOR_ID(__aiter__)
|
|
|
|
STRUCT_FOR_ID(__all__)
|
|
|
|
STRUCT_FOR_ID(__and__)
|
|
|
|
STRUCT_FOR_ID(__anext__)
|
2024-05-21 23:38:12 -03:00
|
|
|
STRUCT_FOR_ID(__annotate__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__annotations__)
|
|
|
|
STRUCT_FOR_ID(__args__)
|
|
|
|
STRUCT_FOR_ID(__await__)
|
|
|
|
STRUCT_FOR_ID(__bases__)
|
|
|
|
STRUCT_FOR_ID(__bool__)
|
2023-05-04 11:59:46 -03:00
|
|
|
STRUCT_FOR_ID(__buffer__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__build_class__)
|
|
|
|
STRUCT_FOR_ID(__builtins__)
|
|
|
|
STRUCT_FOR_ID(__bytes__)
|
|
|
|
STRUCT_FOR_ID(__call__)
|
|
|
|
STRUCT_FOR_ID(__cantrace__)
|
|
|
|
STRUCT_FOR_ID(__class__)
|
|
|
|
STRUCT_FOR_ID(__class_getitem__)
|
|
|
|
STRUCT_FOR_ID(__classcell__)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(__classdict__)
|
|
|
|
STRUCT_FOR_ID(__classdictcell__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__complex__)
|
|
|
|
STRUCT_FOR_ID(__contains__)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(__ctypes_from_outparam__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__del__)
|
|
|
|
STRUCT_FOR_ID(__delattr__)
|
|
|
|
STRUCT_FOR_ID(__delete__)
|
|
|
|
STRUCT_FOR_ID(__delitem__)
|
|
|
|
STRUCT_FOR_ID(__dict__)
|
2022-06-12 13:38:18 -03:00
|
|
|
STRUCT_FOR_ID(__dictoffset__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__dir__)
|
|
|
|
STRUCT_FOR_ID(__divmod__)
|
|
|
|
STRUCT_FOR_ID(__doc__)
|
|
|
|
STRUCT_FOR_ID(__enter__)
|
|
|
|
STRUCT_FOR_ID(__eq__)
|
|
|
|
STRUCT_FOR_ID(__exit__)
|
|
|
|
STRUCT_FOR_ID(__file__)
|
2024-05-06 06:02:37 -03:00
|
|
|
STRUCT_FOR_ID(__firstlineno__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__float__)
|
|
|
|
STRUCT_FOR_ID(__floordiv__)
|
|
|
|
STRUCT_FOR_ID(__format__)
|
|
|
|
STRUCT_FOR_ID(__fspath__)
|
|
|
|
STRUCT_FOR_ID(__ge__)
|
|
|
|
STRUCT_FOR_ID(__get__)
|
|
|
|
STRUCT_FOR_ID(__getattr__)
|
|
|
|
STRUCT_FOR_ID(__getattribute__)
|
|
|
|
STRUCT_FOR_ID(__getinitargs__)
|
|
|
|
STRUCT_FOR_ID(__getitem__)
|
|
|
|
STRUCT_FOR_ID(__getnewargs__)
|
|
|
|
STRUCT_FOR_ID(__getnewargs_ex__)
|
|
|
|
STRUCT_FOR_ID(__getstate__)
|
|
|
|
STRUCT_FOR_ID(__gt__)
|
|
|
|
STRUCT_FOR_ID(__hash__)
|
|
|
|
STRUCT_FOR_ID(__iadd__)
|
|
|
|
STRUCT_FOR_ID(__iand__)
|
|
|
|
STRUCT_FOR_ID(__ifloordiv__)
|
|
|
|
STRUCT_FOR_ID(__ilshift__)
|
|
|
|
STRUCT_FOR_ID(__imatmul__)
|
|
|
|
STRUCT_FOR_ID(__imod__)
|
|
|
|
STRUCT_FOR_ID(__import__)
|
|
|
|
STRUCT_FOR_ID(__imul__)
|
|
|
|
STRUCT_FOR_ID(__index__)
|
|
|
|
STRUCT_FOR_ID(__init__)
|
|
|
|
STRUCT_FOR_ID(__init_subclass__)
|
|
|
|
STRUCT_FOR_ID(__instancecheck__)
|
|
|
|
STRUCT_FOR_ID(__int__)
|
|
|
|
STRUCT_FOR_ID(__invert__)
|
|
|
|
STRUCT_FOR_ID(__ior__)
|
|
|
|
STRUCT_FOR_ID(__ipow__)
|
|
|
|
STRUCT_FOR_ID(__irshift__)
|
|
|
|
STRUCT_FOR_ID(__isabstractmethod__)
|
|
|
|
STRUCT_FOR_ID(__isub__)
|
|
|
|
STRUCT_FOR_ID(__iter__)
|
|
|
|
STRUCT_FOR_ID(__itruediv__)
|
|
|
|
STRUCT_FOR_ID(__ixor__)
|
|
|
|
STRUCT_FOR_ID(__le__)
|
|
|
|
STRUCT_FOR_ID(__len__)
|
|
|
|
STRUCT_FOR_ID(__length_hint__)
|
2022-04-16 19:57:00 -03:00
|
|
|
STRUCT_FOR_ID(__lltrace__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__loader__)
|
|
|
|
STRUCT_FOR_ID(__lshift__)
|
|
|
|
STRUCT_FOR_ID(__lt__)
|
|
|
|
STRUCT_FOR_ID(__main__)
|
2023-07-09 09:27:03 -03:00
|
|
|
STRUCT_FOR_ID(__match_args__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__matmul__)
|
|
|
|
STRUCT_FOR_ID(__missing__)
|
|
|
|
STRUCT_FOR_ID(__mod__)
|
|
|
|
STRUCT_FOR_ID(__module__)
|
|
|
|
STRUCT_FOR_ID(__mro_entries__)
|
|
|
|
STRUCT_FOR_ID(__mul__)
|
|
|
|
STRUCT_FOR_ID(__name__)
|
|
|
|
STRUCT_FOR_ID(__ne__)
|
|
|
|
STRUCT_FOR_ID(__neg__)
|
|
|
|
STRUCT_FOR_ID(__new__)
|
|
|
|
STRUCT_FOR_ID(__newobj__)
|
|
|
|
STRUCT_FOR_ID(__newobj_ex__)
|
|
|
|
STRUCT_FOR_ID(__next__)
|
2022-04-16 15:59:52 -03:00
|
|
|
STRUCT_FOR_ID(__notes__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__or__)
|
2022-03-21 17:33:02 -03:00
|
|
|
STRUCT_FOR_ID(__orig_class__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__origin__)
|
|
|
|
STRUCT_FOR_ID(__package__)
|
|
|
|
STRUCT_FOR_ID(__parameters__)
|
|
|
|
STRUCT_FOR_ID(__path__)
|
|
|
|
STRUCT_FOR_ID(__pos__)
|
|
|
|
STRUCT_FOR_ID(__pow__)
|
|
|
|
STRUCT_FOR_ID(__prepare__)
|
|
|
|
STRUCT_FOR_ID(__qualname__)
|
|
|
|
STRUCT_FOR_ID(__radd__)
|
|
|
|
STRUCT_FOR_ID(__rand__)
|
|
|
|
STRUCT_FOR_ID(__rdivmod__)
|
|
|
|
STRUCT_FOR_ID(__reduce__)
|
|
|
|
STRUCT_FOR_ID(__reduce_ex__)
|
2023-05-04 11:59:46 -03:00
|
|
|
STRUCT_FOR_ID(__release_buffer__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__repr__)
|
|
|
|
STRUCT_FOR_ID(__reversed__)
|
|
|
|
STRUCT_FOR_ID(__rfloordiv__)
|
|
|
|
STRUCT_FOR_ID(__rlshift__)
|
|
|
|
STRUCT_FOR_ID(__rmatmul__)
|
|
|
|
STRUCT_FOR_ID(__rmod__)
|
|
|
|
STRUCT_FOR_ID(__rmul__)
|
|
|
|
STRUCT_FOR_ID(__ror__)
|
|
|
|
STRUCT_FOR_ID(__round__)
|
|
|
|
STRUCT_FOR_ID(__rpow__)
|
|
|
|
STRUCT_FOR_ID(__rrshift__)
|
|
|
|
STRUCT_FOR_ID(__rshift__)
|
|
|
|
STRUCT_FOR_ID(__rsub__)
|
|
|
|
STRUCT_FOR_ID(__rtruediv__)
|
|
|
|
STRUCT_FOR_ID(__rxor__)
|
|
|
|
STRUCT_FOR_ID(__set__)
|
|
|
|
STRUCT_FOR_ID(__set_name__)
|
|
|
|
STRUCT_FOR_ID(__setattr__)
|
|
|
|
STRUCT_FOR_ID(__setitem__)
|
|
|
|
STRUCT_FOR_ID(__setstate__)
|
|
|
|
STRUCT_FOR_ID(__sizeof__)
|
|
|
|
STRUCT_FOR_ID(__slotnames__)
|
|
|
|
STRUCT_FOR_ID(__slots__)
|
|
|
|
STRUCT_FOR_ID(__spec__)
|
2024-03-26 12:18:17 -03:00
|
|
|
STRUCT_FOR_ID(__static_attributes__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__str__)
|
|
|
|
STRUCT_FOR_ID(__sub__)
|
|
|
|
STRUCT_FOR_ID(__subclasscheck__)
|
|
|
|
STRUCT_FOR_ID(__subclasshook__)
|
|
|
|
STRUCT_FOR_ID(__truediv__)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(__type_params__)
|
2022-05-08 12:32:32 -03:00
|
|
|
STRUCT_FOR_ID(__typing_is_unpacked_typevartuple__)
|
2022-06-12 10:22:01 -03:00
|
|
|
STRUCT_FOR_ID(__typing_prepare_subst__)
|
2022-03-11 04:47:26 -04:00
|
|
|
STRUCT_FOR_ID(__typing_subst__)
|
2022-05-08 12:32:32 -03:00
|
|
|
STRUCT_FOR_ID(__typing_unpacked_tuple_args__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__warningregistry__)
|
2022-06-12 13:38:18 -03:00
|
|
|
STRUCT_FOR_ID(__weaklistoffset__)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(__weakref__)
|
|
|
|
STRUCT_FOR_ID(__xor__)
|
|
|
|
STRUCT_FOR_ID(_abc_impl)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_abstract_)
|
2022-12-29 18:41:39 -04:00
|
|
|
STRUCT_FOR_ID(_active)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_anonymous_)
|
|
|
|
STRUCT_FOR_ID(_argtypes_)
|
|
|
|
STRUCT_FOR_ID(_as_parameter_)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(_asyncio_future_blocking)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_blksize)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(_bootstrap)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_check_retval_)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_dealloc_warn)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(_feature_version)
|
2024-02-27 22:13:03 -04:00
|
|
|
STRUCT_FOR_ID(_field_types)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_fields_)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_finalizing)
|
|
|
|
STRUCT_FOR_ID(_find_and_load)
|
|
|
|
STRUCT_FOR_ID(_fix_up_module)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_flags_)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_get_sourcefile)
|
|
|
|
STRUCT_FOR_ID(_handle_fromlist)
|
|
|
|
STRUCT_FOR_ID(_initializing)
|
2023-02-15 09:07:59 -04:00
|
|
|
STRUCT_FOR_ID(_io)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_is_text_encoding)
|
2024-10-08 03:50:42 -03:00
|
|
|
STRUCT_FOR_ID(_isatty_open_only)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_length_)
|
2022-12-29 18:41:39 -04:00
|
|
|
STRUCT_FOR_ID(_limbo)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_lock_unlock_module)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(_loop)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_needs_com_addref_)
|
2024-06-21 12:19:31 -03:00
|
|
|
STRUCT_FOR_ID(_only_immortal)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_restype_)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_showwarnmsg)
|
|
|
|
STRUCT_FOR_ID(_shutdown)
|
|
|
|
STRUCT_FOR_ID(_slotnames)
|
2024-06-12 13:46:39 -03:00
|
|
|
STRUCT_FOR_ID(_strptime)
|
2024-09-25 18:43:58 -03:00
|
|
|
STRUCT_FOR_ID(_strptime_datetime_date)
|
|
|
|
STRUCT_FOR_ID(_strptime_datetime_datetime)
|
|
|
|
STRUCT_FOR_ID(_strptime_datetime_time)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(_type_)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(_uninitialized_submodules)
|
|
|
|
STRUCT_FOR_ID(_warn_unawaited_coroutine)
|
|
|
|
STRUCT_FOR_ID(_xoptions)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(abs_tol)
|
|
|
|
STRUCT_FOR_ID(access)
|
2023-05-26 08:23:29 -03:00
|
|
|
STRUCT_FOR_ID(aclose)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(add)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(add_done_callback)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(after_in_child)
|
|
|
|
STRUCT_FOR_ID(after_in_parent)
|
|
|
|
STRUCT_FOR_ID(aggregate_class)
|
2024-01-24 11:10:17 -04:00
|
|
|
STRUCT_FOR_ID(alias)
|
2024-09-05 06:20:07 -03:00
|
|
|
STRUCT_FOR_ID(align)
|
2024-01-16 12:05:15 -04:00
|
|
|
STRUCT_FOR_ID(allow_code)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(append)
|
2024-04-16 04:32:51 -03:00
|
|
|
STRUCT_FOR_ID(arg)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(argdefs)
|
2024-01-24 11:10:17 -04:00
|
|
|
STRUCT_FOR_ID(args)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(arguments)
|
|
|
|
STRUCT_FOR_ID(argv)
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ID(as_integer_ratio)
|
2023-05-26 08:23:29 -03:00
|
|
|
STRUCT_FOR_ID(asend)
|
2022-11-14 09:56:40 -04:00
|
|
|
STRUCT_FOR_ID(ast)
|
2023-05-26 08:23:29 -03:00
|
|
|
STRUCT_FOR_ID(athrow)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(attribute)
|
|
|
|
STRUCT_FOR_ID(authorizer_callback)
|
2022-11-12 18:44:41 -04:00
|
|
|
STRUCT_FOR_ID(autocommit)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(backtick)
|
|
|
|
STRUCT_FOR_ID(base)
|
|
|
|
STRUCT_FOR_ID(before)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(big)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(binary_form)
|
2024-09-05 06:20:07 -03:00
|
|
|
STRUCT_FOR_ID(bit_size)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(block)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(bound)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(buffer)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(buffer_callback)
|
|
|
|
STRUCT_FOR_ID(buffer_size)
|
|
|
|
STRUCT_FOR_ID(buffering)
|
|
|
|
STRUCT_FOR_ID(buffers)
|
|
|
|
STRUCT_FOR_ID(bufsize)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(builtins)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(byteorder)
|
|
|
|
STRUCT_FOR_ID(bytes)
|
|
|
|
STRUCT_FOR_ID(bytes_per_sep)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(c_call)
|
|
|
|
STRUCT_FOR_ID(c_exception)
|
|
|
|
STRUCT_FOR_ID(c_return)
|
gh-117398: Add datetime Module State (gh-119810)
I was able to make use of the existing datetime_state struct, but there was one tricky thing I had to sort out. We mostly aren't converting to heap types, so we can't use things like PyType_GetModuleByDef() to look up the module state. The solution I came up with is somewhat novel, but I consider it straightforward. Also, it shouldn't have much impact on performance.
In summary, this main changes here are:
* I've added some macros to help hide how various objects relate to module state
* as a solution to the module state lookup problem, I've stored the last loaded module on the current interpreter's internal dict (actually a weakref)
* if the static type method is used after the module has been deleted, it is reloaded
* to avoid extra work when loading the module, we directly copy the objects (new refs only) from the old module state into the new state if the old module hasn't been deleted yet
* during module init we set various objects on the static types' __dict__s; to simplify things, we only do that the first time; once those static types have a separate __dict__ per interpreter, we'll do it every time
* we now clear the module state when the module is destroyed (before, we were leaking everything in _datetime_global_state)
2024-06-03 18:56:00 -03:00
|
|
|
STRUCT_FOR_ID(cached_datetime_module)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(cached_statements)
|
|
|
|
STRUCT_FOR_ID(cadata)
|
|
|
|
STRUCT_FOR_ID(cafile)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(call)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(call_exception_handler)
|
|
|
|
STRUCT_FOR_ID(call_soon)
|
2023-11-27 00:01:44 -04:00
|
|
|
STRUCT_FOR_ID(callback)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(cancel)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(capath)
|
|
|
|
STRUCT_FOR_ID(category)
|
|
|
|
STRUCT_FOR_ID(cb_type)
|
|
|
|
STRUCT_FOR_ID(certfile)
|
|
|
|
STRUCT_FOR_ID(check_same_thread)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(clear)
|
|
|
|
STRUCT_FOR_ID(close)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(closed)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(closefd)
|
|
|
|
STRUCT_FOR_ID(closure)
|
|
|
|
STRUCT_FOR_ID(co_argcount)
|
|
|
|
STRUCT_FOR_ID(co_cellvars)
|
|
|
|
STRUCT_FOR_ID(co_code)
|
|
|
|
STRUCT_FOR_ID(co_consts)
|
|
|
|
STRUCT_FOR_ID(co_exceptiontable)
|
|
|
|
STRUCT_FOR_ID(co_filename)
|
|
|
|
STRUCT_FOR_ID(co_firstlineno)
|
|
|
|
STRUCT_FOR_ID(co_flags)
|
|
|
|
STRUCT_FOR_ID(co_freevars)
|
|
|
|
STRUCT_FOR_ID(co_kwonlyargcount)
|
|
|
|
STRUCT_FOR_ID(co_linetable)
|
|
|
|
STRUCT_FOR_ID(co_name)
|
|
|
|
STRUCT_FOR_ID(co_names)
|
|
|
|
STRUCT_FOR_ID(co_nlocals)
|
|
|
|
STRUCT_FOR_ID(co_posonlyargcount)
|
|
|
|
STRUCT_FOR_ID(co_qualname)
|
|
|
|
STRUCT_FOR_ID(co_stacksize)
|
|
|
|
STRUCT_FOR_ID(co_varnames)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(code)
|
2024-04-17 12:42:04 -03:00
|
|
|
STRUCT_FOR_ID(col_offset)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(command)
|
|
|
|
STRUCT_FOR_ID(comment_factory)
|
2023-05-07 14:47:28 -03:00
|
|
|
STRUCT_FOR_ID(compile_mode)
|
2022-08-24 07:02:53 -03:00
|
|
|
STRUCT_FOR_ID(consts)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(context)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(contravariant)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(cookie)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(copy)
|
|
|
|
STRUCT_FOR_ID(copyreg)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(coro)
|
|
|
|
STRUCT_FOR_ID(count)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(covariant)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(cwd)
|
|
|
|
STRUCT_FOR_ID(data)
|
|
|
|
STRUCT_FOR_ID(database)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(day)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(decode)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(decoder)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(default)
|
|
|
|
STRUCT_FOR_ID(defaultaction)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(delete)
|
|
|
|
STRUCT_FOR_ID(depth)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(desired_access)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(detect_types)
|
|
|
|
STRUCT_FOR_ID(deterministic)
|
|
|
|
STRUCT_FOR_ID(device)
|
|
|
|
STRUCT_FOR_ID(dict)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(dictcomp)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(difference_update)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(digest)
|
|
|
|
STRUCT_FOR_ID(digest_size)
|
|
|
|
STRUCT_FOR_ID(digestmod)
|
|
|
|
STRUCT_FOR_ID(dir_fd)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(discard)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(dispatch_table)
|
|
|
|
STRUCT_FOR_ID(displayhook)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(dklen)
|
|
|
|
STRUCT_FOR_ID(doc)
|
2024-06-22 14:58:35 -03:00
|
|
|
STRUCT_FOR_ID(done)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(dont_inherit)
|
|
|
|
STRUCT_FOR_ID(dst)
|
|
|
|
STRUCT_FOR_ID(dst_dir_fd)
|
2023-05-01 18:10:13 -03:00
|
|
|
STRUCT_FOR_ID(eager_start)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(effective_ids)
|
|
|
|
STRUCT_FOR_ID(element_factory)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(encode)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(encoding)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(end)
|
2024-04-17 12:42:04 -03:00
|
|
|
STRUCT_FOR_ID(end_col_offset)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(end_lineno)
|
|
|
|
STRUCT_FOR_ID(end_offset)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(endpos)
|
2023-04-26 16:22:03 -03:00
|
|
|
STRUCT_FOR_ID(entrypoint)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(env)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(errors)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(event)
|
|
|
|
STRUCT_FOR_ID(eventmask)
|
2024-01-24 11:10:17 -04:00
|
|
|
STRUCT_FOR_ID(exc_type)
|
|
|
|
STRUCT_FOR_ID(exc_value)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(excepthook)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(exception)
|
2023-05-30 07:00:29 -03:00
|
|
|
STRUCT_FOR_ID(existing_file_name)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(exp)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(extend)
|
2023-05-20 21:03:02 -03:00
|
|
|
STRUCT_FOR_ID(extra_tokens)
|
2022-10-08 15:31:57 -03:00
|
|
|
STRUCT_FOR_ID(facility)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(factory)
|
2022-11-02 13:03:38 -03:00
|
|
|
STRUCT_FOR_ID(false)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(family)
|
|
|
|
STRUCT_FOR_ID(fanout)
|
|
|
|
STRUCT_FOR_ID(fd)
|
|
|
|
STRUCT_FOR_ID(fd2)
|
|
|
|
STRUCT_FOR_ID(fdel)
|
|
|
|
STRUCT_FOR_ID(fget)
|
2024-09-05 06:20:07 -03:00
|
|
|
STRUCT_FOR_ID(fields)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(file)
|
|
|
|
STRUCT_FOR_ID(file_actions)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(filename)
|
|
|
|
STRUCT_FOR_ID(fileno)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(filepath)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(fillvalue)
|
2024-02-06 07:34:56 -04:00
|
|
|
STRUCT_FOR_ID(filter)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(filters)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(final)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(find_class)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(fix_imports)
|
|
|
|
STRUCT_FOR_ID(flags)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(flush)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(fold)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(follow_symlinks)
|
|
|
|
STRUCT_FOR_ID(format)
|
2024-09-05 06:20:07 -03:00
|
|
|
STRUCT_FOR_ID(format_spec)
|
2022-11-03 17:20:10 -03:00
|
|
|
STRUCT_FOR_ID(from_param)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(fromlist)
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ID(fromtimestamp)
|
|
|
|
STRUCT_FOR_ID(fromutc)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(fset)
|
|
|
|
STRUCT_FOR_ID(func)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(future)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(generation)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(genexpr)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(get)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(get_debug)
|
|
|
|
STRUCT_FOR_ID(get_event_loop)
|
|
|
|
STRUCT_FOR_ID(get_loop)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(get_source)
|
|
|
|
STRUCT_FOR_ID(getattr)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(getstate)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(gid)
|
|
|
|
STRUCT_FOR_ID(globals)
|
|
|
|
STRUCT_FOR_ID(groupindex)
|
|
|
|
STRUCT_FOR_ID(groups)
|
|
|
|
STRUCT_FOR_ID(handle)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(handle_seq)
|
2024-04-22 22:24:21 -03:00
|
|
|
STRUCT_FOR_ID(has_location)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(hash_name)
|
|
|
|
STRUCT_FOR_ID(header)
|
|
|
|
STRUCT_FOR_ID(headers)
|
|
|
|
STRUCT_FOR_ID(hi)
|
|
|
|
STRUCT_FOR_ID(hook)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(hour)
|
2022-10-08 15:31:57 -03:00
|
|
|
STRUCT_FOR_ID(ident)
|
2023-11-27 00:01:44 -04:00
|
|
|
STRUCT_FOR_ID(identity_hint)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(ignore)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(imag)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(importlib)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(in_fd)
|
|
|
|
STRUCT_FOR_ID(incoming)
|
2024-09-05 06:20:07 -03:00
|
|
|
STRUCT_FOR_ID(index)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(indexgroup)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(inf)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(infer_variance)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(inherit_handle)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(inheritable)
|
|
|
|
STRUCT_FOR_ID(initial)
|
|
|
|
STRUCT_FOR_ID(initial_bytes)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(initial_owner)
|
|
|
|
STRUCT_FOR_ID(initial_state)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(initial_value)
|
|
|
|
STRUCT_FOR_ID(initval)
|
|
|
|
STRUCT_FOR_ID(inner_size)
|
|
|
|
STRUCT_FOR_ID(input)
|
|
|
|
STRUCT_FOR_ID(insert_comments)
|
|
|
|
STRUCT_FOR_ID(insert_pis)
|
2022-08-24 07:02:53 -03:00
|
|
|
STRUCT_FOR_ID(instructions)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(intern)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(intersection)
|
2023-10-07 14:33:22 -03:00
|
|
|
STRUCT_FOR_ID(interval)
|
2023-05-01 18:10:13 -03:00
|
|
|
STRUCT_FOR_ID(is_running)
|
2024-09-05 06:20:07 -03:00
|
|
|
STRUCT_FOR_ID(is_struct)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(isatty)
|
2022-03-07 15:45:00 -04:00
|
|
|
STRUCT_FOR_ID(isinstance)
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ID(isoformat)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(isolation_level)
|
|
|
|
STRUCT_FOR_ID(istext)
|
|
|
|
STRUCT_FOR_ID(item)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(items)
|
|
|
|
STRUCT_FOR_ID(iter)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(iterable)
|
|
|
|
STRUCT_FOR_ID(iterations)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(join)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(jump)
|
|
|
|
STRUCT_FOR_ID(keepends)
|
|
|
|
STRUCT_FOR_ID(key)
|
|
|
|
STRUCT_FOR_ID(keyfile)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(keys)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(kind)
|
2022-11-24 15:56:50 -04:00
|
|
|
STRUCT_FOR_ID(kw)
|
|
|
|
STRUCT_FOR_ID(kw1)
|
|
|
|
STRUCT_FOR_ID(kw2)
|
2024-01-11 04:42:30 -04:00
|
|
|
STRUCT_FOR_ID(kwdefaults)
|
2024-04-17 12:42:04 -03:00
|
|
|
STRUCT_FOR_ID(label)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(lambda)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(last)
|
2023-03-18 08:47:11 -03:00
|
|
|
STRUCT_FOR_ID(last_exc)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(last_node)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(last_traceback)
|
|
|
|
STRUCT_FOR_ID(last_type)
|
|
|
|
STRUCT_FOR_ID(last_value)
|
|
|
|
STRUCT_FOR_ID(latin1)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(leaf_size)
|
2022-03-07 15:45:00 -04:00
|
|
|
STRUCT_FOR_ID(len)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(length)
|
|
|
|
STRUCT_FOR_ID(level)
|
|
|
|
STRUCT_FOR_ID(limit)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(line)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(line_buffering)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(lineno)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(listcomp)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(little)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(lo)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(locale)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(locals)
|
2022-10-08 15:31:57 -03:00
|
|
|
STRUCT_FOR_ID(logoption)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(loop)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(manual_reset)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(mapping)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(match)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(max_length)
|
2022-09-02 13:35:08 -03:00
|
|
|
STRUCT_FOR_ID(maxdigits)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(maxevents)
|
2024-01-29 11:08:23 -04:00
|
|
|
STRUCT_FOR_ID(maxlen)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(maxmem)
|
|
|
|
STRUCT_FOR_ID(maxsplit)
|
|
|
|
STRUCT_FOR_ID(maxvalue)
|
|
|
|
STRUCT_FOR_ID(memLevel)
|
|
|
|
STRUCT_FOR_ID(memlimit)
|
|
|
|
STRUCT_FOR_ID(message)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(metaclass)
|
2023-05-01 18:29:30 -03:00
|
|
|
STRUCT_FOR_ID(metadata)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(method)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(microsecond)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(milliseconds)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(minute)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(mod)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(mode)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(module)
|
|
|
|
STRUCT_FOR_ID(module_globals)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(modules)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(month)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(mro)
|
|
|
|
STRUCT_FOR_ID(msg)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(mutex)
|
2022-10-07 14:36:40 -03:00
|
|
|
STRUCT_FOR_ID(mycmp)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(n_arg)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(n_fields)
|
|
|
|
STRUCT_FOR_ID(n_sequence_fields)
|
|
|
|
STRUCT_FOR_ID(n_unnamed_fields)
|
|
|
|
STRUCT_FOR_ID(name)
|
2022-10-25 19:56:59 -03:00
|
|
|
STRUCT_FOR_ID(name_from)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(namespace_separator)
|
|
|
|
STRUCT_FOR_ID(namespaces)
|
|
|
|
STRUCT_FOR_ID(narg)
|
|
|
|
STRUCT_FOR_ID(ndigits)
|
2024-04-17 12:42:04 -03:00
|
|
|
STRUCT_FOR_ID(nested)
|
2023-05-30 07:00:29 -03:00
|
|
|
STRUCT_FOR_ID(new_file_name)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(new_limit)
|
|
|
|
STRUCT_FOR_ID(newline)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(newlines)
|
2022-05-05 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(next)
|
2023-05-18 18:22:03 -03:00
|
|
|
STRUCT_FOR_ID(nlocals)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(node_depth)
|
|
|
|
STRUCT_FOR_ID(node_offset)
|
|
|
|
STRUCT_FOR_ID(ns)
|
2022-10-20 06:08:54 -03:00
|
|
|
STRUCT_FOR_ID(nstype)
|
2022-12-08 18:38:06 -04:00
|
|
|
STRUCT_FOR_ID(nt)
|
2022-11-02 13:03:38 -03:00
|
|
|
STRUCT_FOR_ID(null)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(number)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(obj)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(object)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(offset)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(offset_dst)
|
|
|
|
STRUCT_FOR_ID(offset_src)
|
|
|
|
STRUCT_FOR_ID(on_type_read)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(onceregistry)
|
2022-10-07 15:06:23 -03:00
|
|
|
STRUCT_FOR_ID(only_keys)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(oparg)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(opcode)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(open)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(opener)
|
|
|
|
STRUCT_FOR_ID(operation)
|
|
|
|
STRUCT_FOR_ID(optimize)
|
|
|
|
STRUCT_FOR_ID(options)
|
|
|
|
STRUCT_FOR_ID(order)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(origin)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(out_fd)
|
|
|
|
STRUCT_FOR_ID(outgoing)
|
|
|
|
STRUCT_FOR_ID(overlapped)
|
|
|
|
STRUCT_FOR_ID(owner)
|
|
|
|
STRUCT_FOR_ID(pages)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(parent)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(password)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(path)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(pattern)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(peek)
|
|
|
|
STRUCT_FOR_ID(persistent_id)
|
|
|
|
STRUCT_FOR_ID(persistent_load)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(person)
|
|
|
|
STRUCT_FOR_ID(pi_factory)
|
|
|
|
STRUCT_FOR_ID(pid)
|
|
|
|
STRUCT_FOR_ID(policy)
|
|
|
|
STRUCT_FOR_ID(pos)
|
2022-11-24 15:56:50 -04:00
|
|
|
STRUCT_FOR_ID(pos1)
|
|
|
|
STRUCT_FOR_ID(pos2)
|
2022-12-08 18:38:06 -04:00
|
|
|
STRUCT_FOR_ID(posix)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(print_file_and_line)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(priority)
|
|
|
|
STRUCT_FOR_ID(progress)
|
|
|
|
STRUCT_FOR_ID(progress_handler)
|
2023-05-30 07:00:29 -03:00
|
|
|
STRUCT_FOR_ID(progress_routine)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(proto)
|
|
|
|
STRUCT_FOR_ID(protocol)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(ps1)
|
|
|
|
STRUCT_FOR_ID(ps2)
|
2022-09-07 17:09:20 -03:00
|
|
|
STRUCT_FOR_ID(query)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(quotetabs)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(raw)
|
|
|
|
STRUCT_FOR_ID(read)
|
|
|
|
STRUCT_FOR_ID(read1)
|
|
|
|
STRUCT_FOR_ID(readable)
|
|
|
|
STRUCT_FOR_ID(readall)
|
|
|
|
STRUCT_FOR_ID(readinto)
|
|
|
|
STRUCT_FOR_ID(readinto1)
|
|
|
|
STRUCT_FOR_ID(readline)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(readonly)
|
|
|
|
STRUCT_FOR_ID(real)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(reducer_override)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(registry)
|
|
|
|
STRUCT_FOR_ID(rel_tol)
|
2023-05-04 11:59:46 -03:00
|
|
|
STRUCT_FOR_ID(release)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(reload)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(repl)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(replace)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(reserved)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(reset)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(resetids)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(return)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(reverse)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(reversed)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(salt)
|
|
|
|
STRUCT_FOR_ID(sched_priority)
|
|
|
|
STRUCT_FOR_ID(scheduler)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(second)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(security_attributes)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(seek)
|
|
|
|
STRUCT_FOR_ID(seekable)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(selectors)
|
2024-01-24 11:10:17 -04:00
|
|
|
STRUCT_FOR_ID(self)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(send)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(sep)
|
|
|
|
STRUCT_FOR_ID(sequence)
|
|
|
|
STRUCT_FOR_ID(server_hostname)
|
|
|
|
STRUCT_FOR_ID(server_side)
|
|
|
|
STRUCT_FOR_ID(session)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(setcomp)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(setpgroup)
|
|
|
|
STRUCT_FOR_ID(setsid)
|
|
|
|
STRUCT_FOR_ID(setsigdef)
|
|
|
|
STRUCT_FOR_ID(setsigmask)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(setstate)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(shape)
|
|
|
|
STRUCT_FOR_ID(show_cmd)
|
|
|
|
STRUCT_FOR_ID(signed)
|
|
|
|
STRUCT_FOR_ID(size)
|
|
|
|
STRUCT_FOR_ID(sizehint)
|
2023-01-27 22:35:14 -04:00
|
|
|
STRUCT_FOR_ID(skip_file_prefixes)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(sleep)
|
|
|
|
STRUCT_FOR_ID(sock)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(sort)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(source)
|
2022-11-02 14:16:06 -03:00
|
|
|
STRUCT_FOR_ID(source_traceback)
|
2024-05-22 12:57:52 -03:00
|
|
|
STRUCT_FOR_ID(spam)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(src)
|
|
|
|
STRUCT_FOR_ID(src_dir_fd)
|
|
|
|
STRUCT_FOR_ID(stacklevel)
|
|
|
|
STRUCT_FOR_ID(start)
|
|
|
|
STRUCT_FOR_ID(statement)
|
|
|
|
STRUCT_FOR_ID(status)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(stderr)
|
|
|
|
STRUCT_FOR_ID(stdin)
|
|
|
|
STRUCT_FOR_ID(stdout)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(step)
|
2023-05-19 17:03:49 -03:00
|
|
|
STRUCT_FOR_ID(steps)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(store_name)
|
|
|
|
STRUCT_FOR_ID(strategy)
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ID(strftime)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(strict)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(strict_mode)
|
|
|
|
STRUCT_FOR_ID(string)
|
|
|
|
STRUCT_FOR_ID(sub_key)
|
2024-11-04 12:18:21 -04:00
|
|
|
STRUCT_FOR_ID(subcalls)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(symmetric_difference_update)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(tabsize)
|
|
|
|
STRUCT_FOR_ID(tag)
|
|
|
|
STRUCT_FOR_ID(target)
|
|
|
|
STRUCT_FOR_ID(target_is_directory)
|
|
|
|
STRUCT_FOR_ID(task)
|
|
|
|
STRUCT_FOR_ID(tb_frame)
|
|
|
|
STRUCT_FOR_ID(tb_lasti)
|
|
|
|
STRUCT_FOR_ID(tb_lineno)
|
|
|
|
STRUCT_FOR_ID(tb_next)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(tell)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(template)
|
|
|
|
STRUCT_FOR_ID(term)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(text)
|
|
|
|
STRUCT_FOR_ID(threading)
|
|
|
|
STRUCT_FOR_ID(throw)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(timeout)
|
2024-11-04 12:18:21 -04:00
|
|
|
STRUCT_FOR_ID(timer)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(times)
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ID(timetuple)
|
2024-11-04 12:18:21 -04:00
|
|
|
STRUCT_FOR_ID(timeunit)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(top)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(trace_callback)
|
2024-01-24 11:10:17 -04:00
|
|
|
STRUCT_FOR_ID(traceback)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(trailers)
|
|
|
|
STRUCT_FOR_ID(translate)
|
2022-11-02 13:03:38 -03:00
|
|
|
STRUCT_FOR_ID(true)
|
2022-02-22 20:23:51 -04:00
|
|
|
STRUCT_FOR_ID(truncate)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(twice)
|
|
|
|
STRUCT_FOR_ID(txt)
|
|
|
|
STRUCT_FOR_ID(type)
|
2023-05-16 00:36:23 -03:00
|
|
|
STRUCT_FOR_ID(type_params)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(tz)
|
2024-01-30 11:19:46 -04:00
|
|
|
STRUCT_FOR_ID(tzinfo)
|
2022-11-07 16:06:23 -04:00
|
|
|
STRUCT_FOR_ID(tzname)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(uid)
|
|
|
|
STRUCT_FOR_ID(unlink)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(unraisablehook)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(uri)
|
|
|
|
STRUCT_FOR_ID(usedforsecurity)
|
|
|
|
STRUCT_FOR_ID(value)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(values)
|
|
|
|
STRUCT_FOR_ID(version)
|
2023-03-10 08:21:37 -04:00
|
|
|
STRUCT_FOR_ID(volume)
|
2024-02-12 20:28:35 -04:00
|
|
|
STRUCT_FOR_ID(wait_all)
|
2024-04-12 08:21:00 -03:00
|
|
|
STRUCT_FOR_ID(warn_on_full_buffer)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(warnings)
|
|
|
|
STRUCT_FOR_ID(warnoptions)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(wbits)
|
|
|
|
STRUCT_FOR_ID(week)
|
|
|
|
STRUCT_FOR_ID(weekday)
|
|
|
|
STRUCT_FOR_ID(which)
|
|
|
|
STRUCT_FOR_ID(who)
|
|
|
|
STRUCT_FOR_ID(withdata)
|
2022-02-08 16:39:07 -04:00
|
|
|
STRUCT_FOR_ID(writable)
|
|
|
|
STRUCT_FOR_ID(write)
|
2022-08-11 18:25:49 -03:00
|
|
|
STRUCT_FOR_ID(write_through)
|
|
|
|
STRUCT_FOR_ID(year)
|
|
|
|
STRUCT_FOR_ID(zdict)
|
2022-02-08 16:39:07 -04:00
|
|
|
} identifiers;
|
2022-03-09 19:02:00 -04:00
|
|
|
struct {
|
|
|
|
PyASCIIObject _ascii;
|
|
|
|
uint8_t _data[2];
|
|
|
|
} ascii[128];
|
|
|
|
struct {
|
|
|
|
PyCompactUnicodeObject _latin1;
|
|
|
|
uint8_t _data[2];
|
|
|
|
} latin1[128];
|
2022-02-08 16:39:07 -04:00
|
|
|
};
|
|
|
|
/* End auto-generated code */
|
|
|
|
|
|
|
|
#undef ID
|
|
|
|
#undef STR
|
|
|
|
|
|
|
|
|
|
|
|
#define _Py_ID(NAME) \
|
2022-11-07 16:06:23 -04:00
|
|
|
(_Py_SINGLETON(strings.identifiers._py_ ## NAME._ascii.ob_base))
|
2022-02-08 16:39:07 -04:00
|
|
|
#define _Py_STR(NAME) \
|
2022-11-07 16:06:23 -04:00
|
|
|
(_Py_SINGLETON(strings.literals._py_ ## NAME._ascii.ob_base))
|
2024-06-21 12:19:31 -03:00
|
|
|
#define _Py_LATIN1_CHR(CH) \
|
|
|
|
((CH) < 128 \
|
|
|
|
? (PyObject*)&_Py_SINGLETON(strings).ascii[(CH)] \
|
|
|
|
: (PyObject*)&_Py_SINGLETON(strings).latin1[(CH) - 128])
|
2022-02-08 16:39:07 -04:00
|
|
|
|
2022-03-23 12:52:50 -03:00
|
|
|
/* _Py_DECLARE_STR() should precede all uses of _Py_STR() in a function.
|
|
|
|
|
|
|
|
This is true even if the same string has already been declared
|
|
|
|
elsewhere, even in the same file. Mismatched duplicates are detected
|
|
|
|
by Tools/scripts/generate-global-objects.py.
|
|
|
|
|
|
|
|
Pairing _Py_DECLARE_STR() with every use of _Py_STR() makes sure the
|
|
|
|
string keeps working even if the declaration is removed somewhere
|
|
|
|
else. It also makes it clear what the actual string is at every
|
|
|
|
place it is being used. */
|
2022-02-14 20:36:51 -04:00
|
|
|
#define _Py_DECLARE_STR(name, str)
|
2022-02-08 16:39:07 -04:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* !Py_INTERNAL_GLOBAL_STRINGS_H */
|