diff options
author | Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> | 2022-11-02 16:03:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 16:03:38 (GMT) |
commit | 780757ac586d7275db5ee1f229fb2f3d2268d14e (patch) | |
tree | 3e769327a6ea11c2baaac45c3067562f936c49e7 /Include | |
parent | df84b7b0bce36d94e90f368b55c9268d5b641dc9 (diff) | |
download | cpython-780757ac586d7275db5ee1f229fb2f3d2268d14e.zip cpython-780757ac586d7275db5ee1f229fb2f3d2268d14e.tar.gz cpython-780757ac586d7275db5ee1f229fb2f3d2268d14e.tar.bz2 |
GH-90699: Remove `_Py_IDENTIFIER` usage from `_json` module (GH-98956)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_global_strings.h | 5 | ||||
-rw-r--r-- | Include/internal/pycore_runtime_init_generated.h | 33 |
2 files changed, 38 insertions, 0 deletions
diff --git a/Include/internal/pycore_global_strings.h b/Include/internal/pycore_global_strings.h index 43f4dac..7e7718d 100644 --- a/Include/internal/pycore_global_strings.h +++ b/Include/internal/pycore_global_strings.h @@ -44,6 +44,7 @@ struct _Py_global_strings { STRUCT_FOR_STR(dot, ".") STRUCT_FOR_STR(dot_locals, ".<locals>") STRUCT_FOR_STR(empty, "") + STRUCT_FOR_STR(json_decoder, "json.decoder") STRUCT_FOR_STR(list_err, "list index out of range") STRUCT_FOR_STR(newline, "\n") STRUCT_FOR_STR(open_br, "{") @@ -53,6 +54,7 @@ struct _Py_global_strings { struct { STRUCT_FOR_ID(False) + STRUCT_FOR_ID(JSONDecodeError) STRUCT_FOR_ID(Py_Repr) STRUCT_FOR_ID(TextIOWrapper) STRUCT_FOR_ID(True) @@ -352,6 +354,7 @@ struct _Py_global_strings { STRUCT_FOR_ID(extend) STRUCT_FOR_ID(facility) STRUCT_FOR_ID(factory) + STRUCT_FOR_ID(false) STRUCT_FOR_ID(family) STRUCT_FOR_ID(fanout) STRUCT_FOR_ID(fd) @@ -491,6 +494,7 @@ struct _Py_global_strings { STRUCT_FOR_ID(node_offset) STRUCT_FOR_ID(ns) STRUCT_FOR_ID(nstype) + STRUCT_FOR_ID(null) STRUCT_FOR_ID(number) STRUCT_FOR_ID(obj) STRUCT_FOR_ID(object) @@ -627,6 +631,7 @@ struct _Py_global_strings { STRUCT_FOR_ID(traceback) STRUCT_FOR_ID(trailers) STRUCT_FOR_ID(translate) + STRUCT_FOR_ID(true) STRUCT_FOR_ID(truncate) STRUCT_FOR_ID(twice) STRUCT_FOR_ID(txt) diff --git a/Include/internal/pycore_runtime_init_generated.h b/Include/internal/pycore_runtime_init_generated.h index f7823d3..d9e8b62 100644 --- a/Include/internal/pycore_runtime_init_generated.h +++ b/Include/internal/pycore_runtime_init_generated.h @@ -554,6 +554,7 @@ extern "C" { INIT_STR(dot, "."), \ INIT_STR(dot_locals, ".<locals>"), \ INIT_STR(empty, ""), \ + INIT_STR(json_decoder, "json.decoder"), \ INIT_STR(list_err, "list index out of range"), \ INIT_STR(newline, "\n"), \ INIT_STR(open_br, "{"), \ @@ -562,6 +563,7 @@ extern "C" { }, \ .identifiers = { \ INIT_ID(False), \ + INIT_ID(JSONDecodeError), \ INIT_ID(Py_Repr), \ INIT_ID(TextIOWrapper), \ INIT_ID(True), \ @@ -861,6 +863,7 @@ extern "C" { INIT_ID(extend), \ INIT_ID(facility), \ INIT_ID(factory), \ + INIT_ID(false), \ INIT_ID(family), \ INIT_ID(fanout), \ INIT_ID(fd), \ @@ -1000,6 +1003,7 @@ extern "C" { INIT_ID(node_offset), \ INIT_ID(ns), \ INIT_ID(nstype), \ + INIT_ID(null), \ INIT_ID(number), \ INIT_ID(obj), \ INIT_ID(object), \ @@ -1136,6 +1140,7 @@ extern "C" { INIT_ID(traceback), \ INIT_ID(trailers), \ INIT_ID(translate), \ + INIT_ID(true), \ INIT_ID(truncate), \ INIT_ID(twice), \ INIT_ID(txt), \ @@ -1437,6 +1442,8 @@ _PyUnicode_InitStaticStrings(void) { PyObject *string; string = &_Py_ID(False); PyUnicode_InternInPlace(&string); + string = &_Py_ID(JSONDecodeError); + PyUnicode_InternInPlace(&string); string = &_Py_ID(Py_Repr); PyUnicode_InternInPlace(&string); string = &_Py_ID(TextIOWrapper); @@ -2035,6 +2042,8 @@ _PyUnicode_InitStaticStrings(void) { PyUnicode_InternInPlace(&string); string = &_Py_ID(factory); PyUnicode_InternInPlace(&string); + string = &_Py_ID(false); + PyUnicode_InternInPlace(&string); string = &_Py_ID(family); PyUnicode_InternInPlace(&string); string = &_Py_ID(fanout); @@ -2313,6 +2322,8 @@ _PyUnicode_InitStaticStrings(void) { PyUnicode_InternInPlace(&string); string = &_Py_ID(nstype); PyUnicode_InternInPlace(&string); + string = &_Py_ID(null); + PyUnicode_InternInPlace(&string); string = &_Py_ID(number); PyUnicode_InternInPlace(&string); string = &_Py_ID(obj); @@ -2585,6 +2596,8 @@ _PyUnicode_InitStaticStrings(void) { PyUnicode_InternInPlace(&string); string = &_Py_ID(translate); PyUnicode_InternInPlace(&string); + string = &_Py_ID(true); + PyUnicode_InternInPlace(&string); string = &_Py_ID(truncate); PyUnicode_InternInPlace(&string); string = &_Py_ID(twice); @@ -4784,6 +4797,10 @@ _PyStaticObjects_CheckRefcnt(void) { _PyObject_Dump((PyObject *)&_Py_STR(empty)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); }; + if (Py_REFCNT((PyObject *)&_Py_STR(json_decoder)) < _PyObject_IMMORTAL_REFCNT) { + _PyObject_Dump((PyObject *)&_Py_STR(json_decoder)); + Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); + }; if (Py_REFCNT((PyObject *)&_Py_STR(list_err)) < _PyObject_IMMORTAL_REFCNT) { _PyObject_Dump((PyObject *)&_Py_STR(list_err)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); @@ -4808,6 +4825,10 @@ _PyStaticObjects_CheckRefcnt(void) { _PyObject_Dump((PyObject *)&_Py_ID(False)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); }; + if (Py_REFCNT((PyObject *)&_Py_ID(JSONDecodeError)) < _PyObject_IMMORTAL_REFCNT) { + _PyObject_Dump((PyObject *)&_Py_ID(JSONDecodeError)); + Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); + }; if (Py_REFCNT((PyObject *)&_Py_ID(Py_Repr)) < _PyObject_IMMORTAL_REFCNT) { _PyObject_Dump((PyObject *)&_Py_ID(Py_Repr)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); @@ -6004,6 +6025,10 @@ _PyStaticObjects_CheckRefcnt(void) { _PyObject_Dump((PyObject *)&_Py_ID(factory)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); }; + if (Py_REFCNT((PyObject *)&_Py_ID(false)) < _PyObject_IMMORTAL_REFCNT) { + _PyObject_Dump((PyObject *)&_Py_ID(false)); + Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); + }; if (Py_REFCNT((PyObject *)&_Py_ID(family)) < _PyObject_IMMORTAL_REFCNT) { _PyObject_Dump((PyObject *)&_Py_ID(family)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); @@ -6560,6 +6585,10 @@ _PyStaticObjects_CheckRefcnt(void) { _PyObject_Dump((PyObject *)&_Py_ID(nstype)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); }; + if (Py_REFCNT((PyObject *)&_Py_ID(null)) < _PyObject_IMMORTAL_REFCNT) { + _PyObject_Dump((PyObject *)&_Py_ID(null)); + Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); + }; if (Py_REFCNT((PyObject *)&_Py_ID(number)) < _PyObject_IMMORTAL_REFCNT) { _PyObject_Dump((PyObject *)&_Py_ID(number)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); @@ -7104,6 +7133,10 @@ _PyStaticObjects_CheckRefcnt(void) { _PyObject_Dump((PyObject *)&_Py_ID(translate)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); }; + if (Py_REFCNT((PyObject *)&_Py_ID(true)) < _PyObject_IMMORTAL_REFCNT) { + _PyObject_Dump((PyObject *)&_Py_ID(true)); + Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); + }; if (Py_REFCNT((PyObject *)&_Py_ID(truncate)) < _PyObject_IMMORTAL_REFCNT) { _PyObject_Dump((PyObject *)&_Py_ID(truncate)); Py_FatalError("immortal object has less refcnt than expected _PyObject_IMMORTAL_REFCNT"); |