summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-11-03 20:20:10 (GMT)
committerGitHub <noreply@github.com>2022-11-03 20:20:10 (GMT)
commit0ee59a9ca3b3576d903d92f5e1a0b6c955a2e3ac (patch)
treea8da8b0d97f318684c5cf7704a4c4ff33ee2d38c /Include
parent0faa0ba240e815614e5a2900e48007acac41b214 (diff)
downloadcpython-0ee59a9ca3b3576d903d92f5e1a0b6c955a2e3ac.zip
cpython-0ee59a9ca3b3576d903d92f5e1a0b6c955a2e3ac.tar.gz
cpython-0ee59a9ca3b3576d903d92f5e1a0b6c955a2e3ac.tar.bz2
GH-90699: Remove `_Py_IDENTIFIER` usage from `_ctypes` (GH-99054)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_global_strings.h16
-rw-r--r--Include/internal/pycore_runtime_init_generated.h112
2 files changed, 128 insertions, 0 deletions
diff --git a/Include/internal/pycore_global_strings.h b/Include/internal/pycore_global_strings.h
index adfe519..002d81e 100644
--- a/Include/internal/pycore_global_strings.h
+++ b/Include/internal/pycore_global_strings.h
@@ -91,6 +91,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(__complex__)
STRUCT_FOR_ID(__contains__)
STRUCT_FOR_ID(__copy__)
+ STRUCT_FOR_ID(__ctypes_from_outparam__)
STRUCT_FOR_ID(__del__)
STRUCT_FOR_ID(__delattr__)
STRUCT_FOR_ID(__delete__)
@@ -217,25 +218,39 @@ struct _Py_global_strings {
STRUCT_FOR_ID(__weakref__)
STRUCT_FOR_ID(__xor__)
STRUCT_FOR_ID(_abc_impl)
+ STRUCT_FOR_ID(_abstract_)
STRUCT_FOR_ID(_annotation)
+ STRUCT_FOR_ID(_anonymous_)
+ STRUCT_FOR_ID(_argtypes_)
+ STRUCT_FOR_ID(_as_parameter_)
STRUCT_FOR_ID(_asyncio_future_blocking)
STRUCT_FOR_ID(_blksize)
STRUCT_FOR_ID(_bootstrap)
+ STRUCT_FOR_ID(_check_retval_)
STRUCT_FOR_ID(_dealloc_warn)
STRUCT_FOR_ID(_feature_version)
+ STRUCT_FOR_ID(_fields_)
STRUCT_FOR_ID(_finalizing)
STRUCT_FOR_ID(_find_and_load)
STRUCT_FOR_ID(_fix_up_module)
+ STRUCT_FOR_ID(_flags_)
STRUCT_FOR_ID(_get_sourcefile)
STRUCT_FOR_ID(_handle_fromlist)
STRUCT_FOR_ID(_initializing)
STRUCT_FOR_ID(_is_text_encoding)
+ STRUCT_FOR_ID(_length_)
STRUCT_FOR_ID(_lock_unlock_module)
STRUCT_FOR_ID(_loop)
+ STRUCT_FOR_ID(_needs_com_addref_)
+ STRUCT_FOR_ID(_pack_)
+ STRUCT_FOR_ID(_restype_)
STRUCT_FOR_ID(_showwarnmsg)
STRUCT_FOR_ID(_shutdown)
STRUCT_FOR_ID(_slotnames)
+ STRUCT_FOR_ID(_swappedbytes_)
+ STRUCT_FOR_ID(_type_)
STRUCT_FOR_ID(_uninitialized_submodules)
+ STRUCT_FOR_ID(_use_broken_old_ctypes_structure_semantics_)
STRUCT_FOR_ID(_warn_unawaited_coroutine)
STRUCT_FOR_ID(_xoptions)
STRUCT_FOR_ID(a)
@@ -387,6 +402,7 @@ struct _Py_global_strings {
STRUCT_FOR_ID(follow_symlinks)
STRUCT_FOR_ID(format)
STRUCT_FOR_ID(frequency)
+ STRUCT_FOR_ID(from_param)
STRUCT_FOR_ID(fromlist)
STRUCT_FOR_ID(fset)
STRUCT_FOR_ID(func)
diff --git a/Include/internal/pycore_runtime_init_generated.h b/Include/internal/pycore_runtime_init_generated.h
index 3064374..88b84cb 100644
--- a/Include/internal/pycore_runtime_init_generated.h
+++ b/Include/internal/pycore_runtime_init_generated.h
@@ -600,6 +600,7 @@ extern "C" {
INIT_ID(__complex__), \
INIT_ID(__contains__), \
INIT_ID(__copy__), \
+ INIT_ID(__ctypes_from_outparam__), \
INIT_ID(__del__), \
INIT_ID(__delattr__), \
INIT_ID(__delete__), \
@@ -726,25 +727,39 @@ extern "C" {
INIT_ID(__weakref__), \
INIT_ID(__xor__), \
INIT_ID(_abc_impl), \
+ INIT_ID(_abstract_), \
INIT_ID(_annotation), \
+ INIT_ID(_anonymous_), \
+ INIT_ID(_argtypes_), \
+ INIT_ID(_as_parameter_), \
INIT_ID(_asyncio_future_blocking), \
INIT_ID(_blksize), \
INIT_ID(_bootstrap), \
+ INIT_ID(_check_retval_), \
INIT_ID(_dealloc_warn), \
INIT_ID(_feature_version), \
+ INIT_ID(_fields_), \
INIT_ID(_finalizing), \
INIT_ID(_find_and_load), \
INIT_ID(_fix_up_module), \
+ INIT_ID(_flags_), \
INIT_ID(_get_sourcefile), \
INIT_ID(_handle_fromlist), \
INIT_ID(_initializing), \
INIT_ID(_is_text_encoding), \
+ INIT_ID(_length_), \
INIT_ID(_lock_unlock_module), \
INIT_ID(_loop), \
+ INIT_ID(_needs_com_addref_), \
+ INIT_ID(_pack_), \
+ INIT_ID(_restype_), \
INIT_ID(_showwarnmsg), \
INIT_ID(_shutdown), \
INIT_ID(_slotnames), \
+ INIT_ID(_swappedbytes_), \
+ INIT_ID(_type_), \
INIT_ID(_uninitialized_submodules), \
+ INIT_ID(_use_broken_old_ctypes_structure_semantics_), \
INIT_ID(_warn_unawaited_coroutine), \
INIT_ID(_xoptions), \
INIT_ID(a), \
@@ -896,6 +911,7 @@ extern "C" {
INIT_ID(follow_symlinks), \
INIT_ID(format), \
INIT_ID(frequency), \
+ INIT_ID(from_param), \
INIT_ID(fromlist), \
INIT_ID(fset), \
INIT_ID(func), \
@@ -1532,6 +1548,8 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(__copy__);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(__ctypes_from_outparam__);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(__del__);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(__delattr__);
@@ -1784,24 +1802,38 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_abc_impl);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_abstract_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_annotation);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_anonymous_);
+ PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_argtypes_);
+ PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_as_parameter_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_asyncio_future_blocking);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_blksize);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_bootstrap);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_check_retval_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_dealloc_warn);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_feature_version);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_fields_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_finalizing);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_find_and_load);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_fix_up_module);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_flags_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_get_sourcefile);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_handle_fromlist);
@@ -1810,18 +1842,32 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_is_text_encoding);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_length_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_lock_unlock_module);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_loop);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_needs_com_addref_);
+ PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_pack_);
+ PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_restype_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_showwarnmsg);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_shutdown);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_slotnames);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_swappedbytes_);
+ PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_type_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_uninitialized_submodules);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(_use_broken_old_ctypes_structure_semantics_);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(_warn_unawaited_coroutine);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(_xoptions);
@@ -2124,6 +2170,8 @@ _PyUnicode_InitStaticStrings(void) {
PyUnicode_InternInPlace(&string);
string = &_Py_ID(frequency);
PyUnicode_InternInPlace(&string);
+ string = &_Py_ID(from_param);
+ PyUnicode_InternInPlace(&string);
string = &_Py_ID(fromlist);
PyUnicode_InternInPlace(&string);
string = &_Py_ID(fset);
@@ -5021,6 +5069,10 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(__copy__));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(__ctypes_from_outparam__)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(__ctypes_from_outparam__));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(__del__)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(__del__));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -5525,10 +5577,26 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(_abc_impl));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_abstract_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_abstract_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_annotation)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_annotation));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_anonymous_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_anonymous_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
+ if (Py_REFCNT((PyObject *)&_Py_ID(_argtypes_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_argtypes_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
+ if (Py_REFCNT((PyObject *)&_Py_ID(_as_parameter_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_as_parameter_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_asyncio_future_blocking)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_asyncio_future_blocking));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -5541,6 +5609,10 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(_bootstrap));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_check_retval_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_check_retval_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_dealloc_warn)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_dealloc_warn));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -5549,6 +5621,10 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(_feature_version));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_fields_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_fields_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_finalizing)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_finalizing));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -5561,6 +5637,10 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(_fix_up_module));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_flags_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_flags_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_get_sourcefile)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_get_sourcefile));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -5577,6 +5657,10 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(_is_text_encoding));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_length_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_length_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_lock_unlock_module)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_lock_unlock_module));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -5585,6 +5669,18 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(_loop));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_needs_com_addref_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_needs_com_addref_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
+ if (Py_REFCNT((PyObject *)&_Py_ID(_pack_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_pack_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
+ if (Py_REFCNT((PyObject *)&_Py_ID(_restype_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_restype_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_showwarnmsg)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_showwarnmsg));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -5597,10 +5693,22 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(_slotnames));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_swappedbytes_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_swappedbytes_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
+ if (Py_REFCNT((PyObject *)&_Py_ID(_type_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_type_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_uninitialized_submodules)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_uninitialized_submodules));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(_use_broken_old_ctypes_structure_semantics_)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(_use_broken_old_ctypes_structure_semantics_));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(_warn_unawaited_coroutine)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(_warn_unawaited_coroutine));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
@@ -6205,6 +6313,10 @@ _PyStaticObjects_CheckRefcnt(void) {
_PyObject_Dump((PyObject *)&_Py_ID(frequency));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
};
+ if (Py_REFCNT((PyObject *)&_Py_ID(from_param)) < _PyObject_IMMORTAL_REFCNT) {
+ _PyObject_Dump((PyObject *)&_Py_ID(from_param));
+ Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");
+ };
if (Py_REFCNT((PyObject *)&_Py_ID(fromlist)) < _PyObject_IMMORTAL_REFCNT) {
_PyObject_Dump((PyObject *)&_Py_ID(fromlist));
Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT");