summaryrefslogtreecommitdiffstats
path: root/Objects/dict-common.h
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-08 20:16:41 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-08 20:16:41 (GMT)
commit3c569295d6e94eddc13b7d7caf71e99f3800b8ad (patch)
tree89402e822739dd754c3d49602ee09a1125b3e57b /Objects/dict-common.h
parent3b6a6b4215950bce2a3b4bfc7d1876ab11e5f591 (diff)
downloadcpython-3c569295d6e94eddc13b7d7caf71e99f3800b8ad.zip
cpython-3c569295d6e94eddc13b7d7caf71e99f3800b8ad.tar.gz
cpython-3c569295d6e94eddc13b7d7caf71e99f3800b8ad.tar.bz2
do not worry about 64-bit dict sizes on 32-bit platforms
Diffstat (limited to 'Objects/dict-common.h')
-rw-r--r--Objects/dict-common.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/dict-common.h b/Objects/dict-common.h
index 865c020..c3baf59 100644
--- a/Objects/dict-common.h
+++ b/Objects/dict-common.h
@@ -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: