diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-17 01:22:45 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-17 01:22:45 +0200 |
commit | 485316200dd2089a50ed5b41f2041bd1a8603622 (patch) | |
tree | 9285ca2dc70ab2c9eab85e76e3d5b0e665934c2d /Python/errors.c | |
parent | 97272eaf34b41ea51267b0008a0f0bc4b7bb2a45 (diff) | |
download | cpython-485316200dd2089a50ed5b41f2041bd1a8603622.tar.gz |
Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in structseq.c
_PyDict_GetItemId() is more efficient: it only builds the Unicode string once.
Identifiers (dictionary keys) are now created at Python initialization, and if
the creation failed, Python does exit with a fatal error.
Before, PyDict_GetItemString() failure was not handled: structseq_new() could
call PyObject_GC_NewVar() with a negative size, and structseq_dealloc() could
also crash.
Diffstat (limited to 'Python/errors.c')
0 files changed, 0 insertions, 0 deletions