gh-120017: use 'do-while(0)' in some {codegen,compile}.c multi-line macros (#120018)

This commit is contained in:
Bénédikt Tran 2024-11-08 00:03:11 +01:00 committed by GitHub
parent bbe9b21d06
commit c222441fa7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 69 additions and 59 deletions

View file

@ -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;