mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
do not worry about 64-bit dict sizes on 32-bit platforms
This commit is contained in:
parent
3b6a6b4215
commit
3c569295d6
2 changed files with 10 additions and 4 deletions
|
@ -59,14 +59,16 @@ struct _dictkeysobject {
|
|||
- 1 byte if dk_size <= 0xff (char*)
|
||||
- 2 bytes if dk_size <= 0xffff (int16_t*)
|
||||
- 4 bytes if dk_size <= 0xffffffff (int32_t*)
|
||||
- 8 bytes otherwise (Py_ssize_t*)
|
||||
- 8 bytes otherwise (int64_t*)
|
||||
|
||||
Dynamically sized, 8 is minimum. */
|
||||
union {
|
||||
int8_t as_1[8];
|
||||
int16_t as_2[4];
|
||||
int32_t as_4[2];
|
||||
#if SIZEOF_VOID_P > 4
|
||||
int64_t as_8[1];
|
||||
#endif
|
||||
} dk_indices;
|
||||
|
||||
/* "PyDictKeyEntry dk_entries[dk_usable];" array follows:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue