mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-87347: Add parenthesis around macro arguments (#93915)
Add unit test on Py_MEMBER_SIZE() and some other macros.
This commit is contained in:
parent
61f24e7885
commit
7ad6f74fcf
30 changed files with 171 additions and 143 deletions
|
@ -154,9 +154,11 @@ struct _dictvalues {
|
|||
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]))
|
||||
(assert((dk)->dk_kind == DICT_KEYS_GENERAL), \
|
||||
(PyDictKeyEntry*)(&((int8_t*)((dk)->dk_indices))[(size_t)1 << (dk)->dk_log2_index_bytes]))
|
||||
#define DK_UNICODE_ENTRIES(dk) \
|
||||
(assert(dk->dk_kind != DICT_KEYS_GENERAL), (PyDictUnicodeEntry*)(&((int8_t*)((dk)->dk_indices))[(size_t)1 << (dk)->dk_log2_index_bytes]))
|
||||
(assert((dk)->dk_kind != DICT_KEYS_GENERAL), \
|
||||
(PyDictUnicodeEntry*)(&((int8_t*)((dk)->dk_indices))[(size_t)1 << (dk)->dk_log2_index_bytes]))
|
||||
#define DK_IS_UNICODE(dk) ((dk)->dk_kind != DICT_KEYS_GENERAL)
|
||||
|
||||
extern uint64_t _pydict_global_version;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue