diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-08 18:37:36 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-08 18:37:36 (GMT) |
commit | 58f7c5a9554e95b030e5d72f7ef4e48db87a6149 (patch) | |
tree | c594673fe57da4d925846a66319bb815e81ea419 /Objects/dictobject.c | |
parent | 208857ec337ecc065fa0c72bad56ffdf483fe2ae (diff) | |
download | cpython-58f7c5a9554e95b030e5d72f7ef4e48db87a6149.zip cpython-58f7c5a9554e95b030e5d72f7ef4e48db87a6149.tar.gz cpython-58f7c5a9554e95b030e5d72f7ef4e48db87a6149.tar.bz2 |
Reindeint DK_xxx macros
Issue #27350.
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index ff285bd..be0d721 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -281,14 +281,19 @@ PyDict_Fini(void) #define DK_SIZE(dk) ((dk)->dk_size) #if SIZEOF_VOID_P > 4 -#define DK_IXSIZE(dk) (DK_SIZE(dk) <= 0xff ? 1 : DK_SIZE(dk) <= 0xffff ? 2 : \ - DK_SIZE(dk) <= 0xffffffff ? 4 : sizeof(Py_ssize_t)) +#define DK_IXSIZE(dk) \ + (DK_SIZE(dk) <= 0xff ? \ + 1 : DK_SIZE(dk) <= 0xffff ? \ + 2 : DK_SIZE(dk) <= 0xffffffff ? \ + 4 : sizeof(Py_ssize_t)) #else -#define DK_IXSIZE(dk) (DK_SIZE(dk) <= 0xff ? 1 : DK_SIZE(dk) <= 0xffff ? 2 : \ - sizeof(Py_ssize_t)) +#define DK_IXSIZE(dk) \ + (DK_SIZE(dk) <= 0xff ? \ + 1 : DK_SIZE(dk) <= 0xffff ? \ + 2 : sizeof(Py_ssize_t)) #endif -#define DK_ENTRIES(dk) ((PyDictKeyEntry*)(&(dk)->dk_indices[DK_SIZE(dk) * \ - DK_IXSIZE(dk)])) +#define DK_ENTRIES(dk) \ + ((PyDictKeyEntry*)(&(dk)->dk_indices[DK_SIZE(dk) * DK_IXSIZE(dk)])) #define DK_DEBUG_INCREF _Py_INC_REFTOTAL _Py_REF_DEBUG_COMMA #define DK_DEBUG_DECREF _Py_DEC_REFTOTAL _Py_REF_DEBUG_COMMA |