diff options
Diffstat (limited to 'Python/optimizer_analysis.c')
-rw-r--r-- | Python/optimizer_analysis.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Python/optimizer_analysis.c b/Python/optimizer_analysis.c index d73bc31..b104d2f 100644 --- a/Python/optimizer_analysis.c +++ b/Python/optimizer_analysis.c @@ -588,16 +588,17 @@ remove_globals(_PyInterpreterFrame *frame, _PyUOpInstruction *buffer, INST->oparg = ARG; \ INST->operand = OPERAND; +#define OUT_OF_SPACE_IF_NULL(EXPR) \ + do { \ + if ((EXPR) == NULL) { \ + goto out_of_space; \ + } \ + } while (0); + #define _LOAD_ATTR_NOT_NULL \ do { \ - attr = sym_new_known_notnull(ctx); \ - if (attr == NULL) { \ - goto error; \ - } \ - null = sym_new_null(ctx); \ - if (null == NULL) { \ - goto error; \ - } \ + OUT_OF_SPACE_IF_NULL(attr = sym_new_known_notnull(ctx)); \ + OUT_OF_SPACE_IF_NULL(null = sym_new_null(ctx)); \ } while (0); |