Skip to content

Commit

Permalink
corrected comments
Browse files Browse the repository at this point in the history
  • Loading branch information
blhsing committed Jul 11, 2024
1 parent cab9a52 commit f8c62c6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Include/pymacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,8 @@
// "comparison of unsigned expression in '< 0' is always false".
#define _Py_IS_TYPE_SIGNED(type) ((type)(-1) <= 0)

/* Test if dict_or_mapping is a dict, call dict_func if it is, or call
* mapping_func if not. If test_mapping is TEST_MAPPING, also test if
* dict_or_mapping is a mapping before calling mapping_func. test_mapping
* should be set to NOTEST_MAPPING otherwise.
*/
// Test if dict_or_mapping is a dict, and call dict_func if it is, or call
// mapping_func if not. Store the returning value in result.
#define _Py_DICT_OR_MAPPING(dict_or_mapping, result, \
dict_func, mapping_func, ...) \
if (PyDict_Check(dict_or_mapping)) { \
Expand All @@ -204,6 +201,9 @@
result = mapping_func(dict_or_mapping, ##__VA_ARGS__); \
}

// Test if dict_or_mapping is a dict, and call dict_func if it is, or call
// mapping_func if dict_or_mapping is a mapping; otherwise execute else_block.
// Store the returning value in result.
#define _Py_DICT_OR_MAPPING_ELSE(dict_or_mapping, result, \
dict_func, mapping_func, else_block, ...) \
if (PyDict_Check(dict_or_mapping)) { \
Expand Down

0 comments on commit f8c62c6

Please sign in to comment.