diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-09-08 19:20:12 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-09-08 19:20:12 (GMT) |
commit | 186122ead26f3ae4c2bc9f6715d2a29d339fdc5a (patch) | |
tree | e43fc5405c60704832b9654b893ecc6dfdc3a200 /Objects/dict-common.h | |
parent | a4348cc1bef6f97d0a44b5f8fc60fbcffbcf7cb9 (diff) | |
download | cpython-186122ead26f3ae4c2bc9f6715d2a29d339fdc5a.zip cpython-186122ead26f3ae4c2bc9f6715d2a29d339fdc5a.tar.gz cpython-186122ead26f3ae4c2bc9f6715d2a29d339fdc5a.tar.bz2 |
access dk_indices through a union
Diffstat (limited to 'Objects/dict-common.h')
-rw-r--r-- | Objects/dict-common.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Objects/dict-common.h b/Objects/dict-common.h index d31cafe..865c020 100644 --- a/Objects/dict-common.h +++ b/Objects/dict-common.h @@ -62,7 +62,12 @@ struct _dictkeysobject { - 8 bytes otherwise (Py_ssize_t*) Dynamically sized, 8 is minimum. */ - char dk_indices[8]; + union { + int8_t as_1[8]; + int16_t as_2[4]; + int32_t as_4[2]; + int64_t as_8[1]; + } dk_indices; /* "PyDictKeyEntry dk_entries[dk_usable];" array follows: see the DK_ENTRIES() macro */ |