◐ Shell
clean mode source ↗

bpo-40521: Optimize PyUnicode_New(0, maxchar) by vstinner · Pull Request #21099 · python/cpython

Functions of unicodeobject.c, like PyUnicode_New(), no longer check
if the empty Unicode singleton has been initialized or not. Consider
that it is always initialized. The Unicode API must not be used
before _PyUnicode_Init() or after _PyUnicode_Fini().

fasih pushed a commit to fasih/cpython that referenced this pull request

Jun 29, 2020
Functions of unicodeobject.c, like PyUnicode_New(), no longer check
if the empty Unicode singleton has been initialized or not. Consider
that it is always initialized. The Unicode API must not be used
before _PyUnicode_Init() or after _PyUnicode_Fini().