mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-120017: use 'do-while(0)' in some {codegen,compile}.c
multi-line macros (#120018)
This commit is contained in:
parent
bbe9b21d06
commit
c222441fa7
2 changed files with 69 additions and 59 deletions
|
@ -31,9 +31,11 @@
|
|||
#define ERROR -1
|
||||
|
||||
#define RETURN_IF_ERROR(X) \
|
||||
if ((X) == -1) { \
|
||||
return ERROR; \
|
||||
}
|
||||
do { \
|
||||
if ((X) == -1) { \
|
||||
return ERROR; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
typedef _Py_SourceLocation location;
|
||||
typedef _PyJumpTargetLabel jump_target_label;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue