diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-01-11 16:37:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 16:37:24 (GMT) |
commit | cf496d657a1a82eaf9ebfb47d721676fef6effa5 (patch) | |
tree | 6fde71cbde5f2713d77015f1c86baede744a239f /Python | |
parent | 6f05e1ec193c132015e9a23d1137b1731596f186 (diff) | |
download | cpython-cf496d657a1a82eaf9ebfb47d721676fef6effa5.zip cpython-cf496d657a1a82eaf9ebfb47d721676fef6effa5.tar.gz cpython-cf496d657a1a82eaf9ebfb47d721676fef6effa5.tar.bz2 |
bpo-45953: Statically allocate and initialize global bytes objects. (gh-30096)
The empty bytes object (b'') and the 256 one-character bytes objects were allocated at runtime init. Now we statically allocate and initialize them.
https://bugs.python.org/issue45953
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pylifecycle.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index b2f58f4..284cfac 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -678,11 +678,6 @@ pycore_init_global_objects(PyInterpreterState *interp) _PyFloat_InitState(interp); - status = _PyBytes_InitGlobalObjects(interp); - if (_PyStatus_EXCEPTION(status)) { - return status; - } - status = _PyUnicode_InitGlobalObjects(interp); if (_PyStatus_EXCEPTION(status)) { return status; @@ -1685,7 +1680,6 @@ finalize_interp_types(PyInterpreterState *interp) _PySlice_Fini(interp); - _PyBytes_Fini(interp); _PyUnicode_Fini(interp); _PyFloat_Fini(interp); } |