[Python-checkins] gh-46845: clean up unused DK_IXSIZE (GH-96405)

miss-islington webhook-mailer at python.org
Tue Aug 30 03:29:02 EDT 2022


https://github.com/python/cpython/commit/1901ee7a5251a3a2a2d9f65f25205b0b918d5c97
commit: 1901ee7a5251a3a2a2d9f65f25205b0b918d5c97
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-08-30T00:28:51-07:00
summary:

gh-46845: clean up unused DK_IXSIZE (GH-96405)

(cherry picked from commit d21d2f0793ce32d72759d5cfc11622d13e3e6b81)

Co-authored-by: Matthias Görgens <matthias.goergens at gmail.com>

files:
M Include/internal/pycore_dict.h

diff --git a/Include/internal/pycore_dict.h b/Include/internal/pycore_dict.h
index 24d2a711878c..dc308fe5e218 100644
--- a/Include/internal/pycore_dict.h
+++ b/Include/internal/pycore_dict.h
@@ -141,17 +141,8 @@ struct _dictvalues {
 #define DK_LOG_SIZE(dk)  ((dk)->dk_log2_size)
 #if SIZEOF_VOID_P > 4
 #define DK_SIZE(dk)      (((int64_t)1)<<DK_LOG_SIZE(dk))
-#define DK_IXSIZE(dk)                     \
-    (DK_LOG_SIZE(dk) <= 7 ?               \
-        1 : DK_LOG_SIZE(dk) <= 15 ?       \
-            2 : DK_LOG_SIZE(dk) <= 31 ?   \
-                4 : sizeof(int64_t))
 #else
 #define DK_SIZE(dk)      (1<<DK_LOG_SIZE(dk))
-#define DK_IXSIZE(dk)                     \
-    (DK_LOG_SIZE(dk) <= 7 ?               \
-        1 : DK_LOG_SIZE(dk) <= 15 ?       \
-            2 : sizeof(int32_t))
 #endif
 #define DK_ENTRIES(dk) \
     (assert(dk->dk_kind == DICT_KEYS_GENERAL), (PyDictKeyEntry*)(&((int8_t*)((dk)->dk_indices))[(size_t)1 << (dk)->dk_log2_index_bytes]))



More information about the Python-checkins mailing list