mirror of
https://github.com/python/cpython.git
synced 2026-05-05 01:51:01 +00:00
gh-142908: Don't use DK_IS_UNICODE in interpreter (gh-142909)
`DK_IS_UNICODE()` includes split keys and we don't want to specialize on those accesses..
This commit is contained in:
parent
49c3b0a67a
commit
8cf5c4d89a
4 changed files with 17 additions and 17 deletions
|
|
@ -1285,7 +1285,7 @@ specialize_load_global_lock_held(
|
|||
goto fail;
|
||||
}
|
||||
PyDictKeysObject * globals_keys = ((PyDictObject *)globals)->ma_keys;
|
||||
if (!DK_IS_UNICODE(globals_keys)) {
|
||||
if (globals_keys->dk_kind != DICT_KEYS_UNICODE) {
|
||||
SPECIALIZATION_FAIL(LOAD_GLOBAL, SPEC_FAIL_LOAD_GLOBAL_NON_STRING_OR_SPLIT);
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -1320,7 +1320,7 @@ specialize_load_global_lock_held(
|
|||
goto fail;
|
||||
}
|
||||
PyDictKeysObject * builtin_keys = ((PyDictObject *)builtins)->ma_keys;
|
||||
if (!DK_IS_UNICODE(builtin_keys)) {
|
||||
if (builtin_keys->dk_kind != DICT_KEYS_UNICODE) {
|
||||
SPECIALIZATION_FAIL(LOAD_GLOBAL, SPEC_FAIL_LOAD_GLOBAL_NON_STRING_OR_SPLIT);
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue