Commit 1acc129d authored by Victor Stinner's avatar Victor Stinner

Parser/asdl_c.py: use Py_CLEAR()

parent ce72e1ce
...@@ -526,8 +526,7 @@ class Obj2ModVisitor(PickleVisitor): ...@@ -526,8 +526,7 @@ class Obj2ModVisitor(PickleVisitor):
(field.type, field.name), depth+1) (field.type, field.name), depth+1)
self.emit("if (res != 0) goto failed;", depth+1) self.emit("if (res != 0) goto failed;", depth+1)
self.emit("Py_XDECREF(tmp);", depth+1) self.emit("Py_CLEAR(tmp);", depth+1)
self.emit("tmp = NULL;", depth+1)
self.emit("} else {", depth) self.emit("} else {", depth)
if not field.opt: if not field.opt:
message = "required field \\\"%s\\\" missing from %s" % (field.name, name) message = "required field \\\"%s\\\" missing from %s" % (field.name, name)
......
...@@ -3553,8 +3553,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena) ...@@ -3553,8 +3553,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Module"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Module");
return 1; return 1;
...@@ -3589,8 +3588,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena) ...@@ -3589,8 +3588,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Interactive"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Interactive");
return 1; return 1;
...@@ -3612,8 +3610,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena) ...@@ -3612,8 +3610,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &body, arena); res = obj2ast_expr(tmp, &body, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Expression"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Expression");
return 1; return 1;
...@@ -3648,8 +3645,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena) ...@@ -3648,8 +3645,7 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Suite"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Suite");
return 1; return 1;
...@@ -3684,8 +3680,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3684,8 +3680,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_int(tmp, &lineno, arena); res = obj2ast_int(tmp, &lineno, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from stmt"); PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from stmt");
return 1; return 1;
...@@ -3696,8 +3691,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3696,8 +3691,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_int(tmp, &col_offset, arena); res = obj2ast_int(tmp, &col_offset, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from stmt"); PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from stmt");
return 1; return 1;
...@@ -3719,8 +3713,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3719,8 +3713,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &name, arena); res = obj2ast_identifier(tmp, &name, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from FunctionDef"); PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from FunctionDef");
return 1; return 1;
...@@ -3731,8 +3724,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3731,8 +3724,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_arguments(tmp, &args, arena); res = obj2ast_arguments(tmp, &args, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from FunctionDef"); PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from FunctionDef");
return 1; return 1;
...@@ -3756,8 +3748,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3756,8 +3748,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from FunctionDef"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from FunctionDef");
return 1; return 1;
...@@ -3781,8 +3772,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3781,8 +3772,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(decorator_list, i, value); asdl_seq_SET(decorator_list, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from FunctionDef"); PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from FunctionDef");
return 1; return 1;
...@@ -3793,8 +3783,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3793,8 +3783,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &returns, arena); res = obj2ast_expr(tmp, &returns, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
returns = NULL; returns = NULL;
} }
...@@ -3822,8 +3811,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3822,8 +3811,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &name, arena); res = obj2ast_identifier(tmp, &name, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from ClassDef"); PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from ClassDef");
return 1; return 1;
...@@ -3847,8 +3835,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3847,8 +3835,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(bases, i, value); asdl_seq_SET(bases, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"bases\" missing from ClassDef"); PyErr_SetString(PyExc_TypeError, "required field \"bases\" missing from ClassDef");
return 1; return 1;
...@@ -3872,8 +3859,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3872,8 +3859,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(keywords, i, value); asdl_seq_SET(keywords, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from ClassDef"); PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from ClassDef");
return 1; return 1;
...@@ -3884,8 +3870,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3884,8 +3870,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &starargs, arena); res = obj2ast_expr(tmp, &starargs, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
starargs = NULL; starargs = NULL;
} }
...@@ -3895,8 +3880,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3895,8 +3880,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &kwargs, arena); res = obj2ast_expr(tmp, &kwargs, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
kwargs = NULL; kwargs = NULL;
} }
...@@ -3919,8 +3903,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3919,8 +3903,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ClassDef"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ClassDef");
return 1; return 1;
...@@ -3944,8 +3927,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3944,8 +3927,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(decorator_list, i, value); asdl_seq_SET(decorator_list, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from ClassDef"); PyErr_SetString(PyExc_TypeError, "required field \"decorator_list\" missing from ClassDef");
return 1; return 1;
...@@ -3968,8 +3950,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -3968,8 +3950,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
value = NULL; value = NULL;
} }
...@@ -4003,8 +3984,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4003,8 +3984,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(targets, i, value); asdl_seq_SET(targets, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"targets\" missing from Delete"); PyErr_SetString(PyExc_TypeError, "required field \"targets\" missing from Delete");
return 1; return 1;
...@@ -4040,8 +4020,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4040,8 +4020,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(targets, i, value); asdl_seq_SET(targets, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"targets\" missing from Assign"); PyErr_SetString(PyExc_TypeError, "required field \"targets\" missing from Assign");
return 1; return 1;
...@@ -4052,8 +4031,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4052,8 +4031,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Assign"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Assign");
return 1; return 1;
...@@ -4077,8 +4055,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4077,8 +4055,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &target, arena); res = obj2ast_expr(tmp, &target, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from AugAssign"); PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from AugAssign");
return 1; return 1;
...@@ -4089,8 +4066,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4089,8 +4066,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_operator(tmp, &op, arena); res = obj2ast_operator(tmp, &op, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from AugAssign"); PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from AugAssign");
return 1; return 1;
...@@ -4101,8 +4077,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4101,8 +4077,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from AugAssign"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from AugAssign");
return 1; return 1;
...@@ -4127,8 +4102,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4127,8 +4102,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &target, arena); res = obj2ast_expr(tmp, &target, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from For"); PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from For");
return 1; return 1;
...@@ -4139,8 +4113,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4139,8 +4113,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &iter, arena); res = obj2ast_expr(tmp, &iter, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from For"); PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from For");
return 1; return 1;
...@@ -4164,8 +4137,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4164,8 +4137,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from For"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from For");
return 1; return 1;
...@@ -4189,8 +4161,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4189,8 +4161,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from For"); PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from For");
return 1; return 1;
...@@ -4214,8 +4185,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4214,8 +4185,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &test, arena); res = obj2ast_expr(tmp, &test, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from While"); PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from While");
return 1; return 1;
...@@ -4239,8 +4209,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4239,8 +4209,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from While"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from While");
return 1; return 1;
...@@ -4264,8 +4233,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4264,8 +4233,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from While"); PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from While");
return 1; return 1;
...@@ -4289,8 +4257,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4289,8 +4257,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &test, arena); res = obj2ast_expr(tmp, &test, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from If"); PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from If");
return 1; return 1;
...@@ -4314,8 +4281,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4314,8 +4281,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from If"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from If");
return 1; return 1;
...@@ -4339,8 +4305,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4339,8 +4305,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from If"); PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from If");
return 1; return 1;
...@@ -4376,8 +4341,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4376,8 +4341,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(items, i, value); asdl_seq_SET(items, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"items\" missing from With"); PyErr_SetString(PyExc_TypeError, "required field \"items\" missing from With");
return 1; return 1;
...@@ -4401,8 +4365,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4401,8 +4365,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from With"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from With");
return 1; return 1;
...@@ -4425,8 +4388,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4425,8 +4388,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &exc, arena); res = obj2ast_expr(tmp, &exc, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
exc = NULL; exc = NULL;
} }
...@@ -4436,8 +4398,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4436,8 +4398,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &cause, arena); res = obj2ast_expr(tmp, &cause, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
cause = NULL; cause = NULL;
} }
...@@ -4474,8 +4435,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4474,8 +4435,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Try"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Try");
return 1; return 1;
...@@ -4499,8 +4459,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4499,8 +4459,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(handlers, i, value); asdl_seq_SET(handlers, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"handlers\" missing from Try"); PyErr_SetString(PyExc_TypeError, "required field \"handlers\" missing from Try");
return 1; return 1;
...@@ -4524,8 +4483,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4524,8 +4483,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from Try"); PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from Try");
return 1; return 1;
...@@ -4549,8 +4507,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4549,8 +4507,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(finalbody, i, value); asdl_seq_SET(finalbody, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"finalbody\" missing from Try"); PyErr_SetString(PyExc_TypeError, "required field \"finalbody\" missing from Try");
return 1; return 1;
...@@ -4574,8 +4531,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4574,8 +4531,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &test, arena); res = obj2ast_expr(tmp, &test, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from Assert"); PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from Assert");
return 1; return 1;
...@@ -4586,8 +4542,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4586,8 +4542,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &msg, arena); res = obj2ast_expr(tmp, &msg, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
msg = NULL; msg = NULL;
} }
...@@ -4621,8 +4576,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4621,8 +4576,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Import"); PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Import");
return 1; return 1;
...@@ -4646,8 +4600,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4646,8 +4600,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &module, arena); res = obj2ast_identifier(tmp, &module, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
module = NULL; module = NULL;
} }
...@@ -4670,8 +4623,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4670,8 +4623,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from ImportFrom"); PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from ImportFrom");
return 1; return 1;
...@@ -4682,8 +4634,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4682,8 +4634,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_int(tmp, &level, arena); res = obj2ast_int(tmp, &level, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
level = 0; level = 0;
} }
...@@ -4717,8 +4668,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4717,8 +4668,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Global"); PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Global");
return 1; return 1;
...@@ -4753,8 +4703,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4753,8 +4703,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Nonlocal"); PyErr_SetString(PyExc_TypeError, "required field \"names\" missing from Nonlocal");
return 1; return 1;
...@@ -4776,8 +4725,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena) ...@@ -4776,8 +4725,7 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Expr"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Expr");
return 1; return 1;
...@@ -4842,8 +4790,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4842,8 +4790,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_int(tmp, &lineno, arena); res = obj2ast_int(tmp, &lineno, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from expr"); PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from expr");
return 1; return 1;
...@@ -4854,8 +4801,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4854,8 +4801,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_int(tmp, &col_offset, arena); res = obj2ast_int(tmp, &col_offset, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from expr"); PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from expr");
return 1; return 1;
...@@ -4874,8 +4820,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4874,8 +4820,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_boolop(tmp, &op, arena); res = obj2ast_boolop(tmp, &op, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from BoolOp"); PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from BoolOp");
return 1; return 1;
...@@ -4899,8 +4844,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4899,8 +4844,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(values, i, value); asdl_seq_SET(values, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"values\" missing from BoolOp"); PyErr_SetString(PyExc_TypeError, "required field \"values\" missing from BoolOp");
return 1; return 1;
...@@ -4924,8 +4868,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4924,8 +4868,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &left, arena); res = obj2ast_expr(tmp, &left, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"left\" missing from BinOp"); PyErr_SetString(PyExc_TypeError, "required field \"left\" missing from BinOp");
return 1; return 1;
...@@ -4936,8 +4879,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4936,8 +4879,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_operator(tmp, &op, arena); res = obj2ast_operator(tmp, &op, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from BinOp"); PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from BinOp");
return 1; return 1;
...@@ -4948,8 +4890,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4948,8 +4890,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &right, arena); res = obj2ast_expr(tmp, &right, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"right\" missing from BinOp"); PyErr_SetString(PyExc_TypeError, "required field \"right\" missing from BinOp");
return 1; return 1;
...@@ -4972,8 +4913,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4972,8 +4913,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_unaryop(tmp, &op, arena); res = obj2ast_unaryop(tmp, &op, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from UnaryOp"); PyErr_SetString(PyExc_TypeError, "required field \"op\" missing from UnaryOp");
return 1; return 1;
...@@ -4984,8 +4924,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -4984,8 +4924,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &operand, arena); res = obj2ast_expr(tmp, &operand, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"operand\" missing from UnaryOp"); PyErr_SetString(PyExc_TypeError, "required field \"operand\" missing from UnaryOp");
return 1; return 1;
...@@ -5008,8 +4947,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5008,8 +4947,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_arguments(tmp, &args, arena); res = obj2ast_arguments(tmp, &args, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from Lambda"); PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from Lambda");
return 1; return 1;
...@@ -5020,8 +4958,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5020,8 +4958,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &body, arena); res = obj2ast_expr(tmp, &body, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Lambda"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from Lambda");
return 1; return 1;
...@@ -5045,8 +4982,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5045,8 +4982,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &test, arena); res = obj2ast_expr(tmp, &test, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from IfExp"); PyErr_SetString(PyExc_TypeError, "required field \"test\" missing from IfExp");
return 1; return 1;
...@@ -5057,8 +4993,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5057,8 +4993,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &body, arena); res = obj2ast_expr(tmp, &body, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from IfExp"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from IfExp");
return 1; return 1;
...@@ -5069,8 +5004,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5069,8 +5004,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &orelse, arena); res = obj2ast_expr(tmp, &orelse, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from IfExp"); PyErr_SetString(PyExc_TypeError, "required field \"orelse\" missing from IfExp");
return 1; return 1;
...@@ -5106,8 +5040,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5106,8 +5040,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(keys, i, value); asdl_seq_SET(keys, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"keys\" missing from Dict"); PyErr_SetString(PyExc_TypeError, "required field \"keys\" missing from Dict");
return 1; return 1;
...@@ -5131,8 +5064,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5131,8 +5064,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(values, i, value); asdl_seq_SET(values, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"values\" missing from Dict"); PyErr_SetString(PyExc_TypeError, "required field \"values\" missing from Dict");
return 1; return 1;
...@@ -5167,8 +5099,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5167,8 +5099,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(elts, i, value); asdl_seq_SET(elts, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from Set"); PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from Set");
return 1; return 1;
...@@ -5191,8 +5122,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5191,8 +5122,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &elt, arena); res = obj2ast_expr(tmp, &elt, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from ListComp"); PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from ListComp");
return 1; return 1;
...@@ -5216,8 +5146,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5216,8 +5146,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from ListComp"); PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from ListComp");
return 1; return 1;
...@@ -5240,8 +5169,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5240,8 +5169,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &elt, arena); res = obj2ast_expr(tmp, &elt, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from SetComp"); PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from SetComp");
return 1; return 1;
...@@ -5265,8 +5193,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5265,8 +5193,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from SetComp"); PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from SetComp");
return 1; return 1;
...@@ -5290,8 +5217,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5290,8 +5217,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &key, arena); res = obj2ast_expr(tmp, &key, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"key\" missing from DictComp"); PyErr_SetString(PyExc_TypeError, "required field \"key\" missing from DictComp");
return 1; return 1;
...@@ -5302,8 +5228,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5302,8 +5228,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from DictComp"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from DictComp");
return 1; return 1;
...@@ -5327,8 +5252,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5327,8 +5252,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from DictComp"); PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from DictComp");
return 1; return 1;
...@@ -5351,8 +5275,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5351,8 +5275,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &elt, arena); res = obj2ast_expr(tmp, &elt, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from GeneratorExp"); PyErr_SetString(PyExc_TypeError, "required field \"elt\" missing from GeneratorExp");
return 1; return 1;
...@@ -5376,8 +5299,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5376,8 +5299,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from GeneratorExp"); PyErr_SetString(PyExc_TypeError, "required field \"generators\" missing from GeneratorExp");
return 1; return 1;
...@@ -5399,8 +5321,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5399,8 +5321,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
value = NULL; value = NULL;
} }
...@@ -5421,8 +5342,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5421,8 +5342,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from YieldFrom"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from YieldFrom");
return 1; return 1;
...@@ -5446,8 +5366,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5446,8 +5366,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &left, arena); res = obj2ast_expr(tmp, &left, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"left\" missing from Compare"); PyErr_SetString(PyExc_TypeError, "required field \"left\" missing from Compare");
return 1; return 1;
...@@ -5471,8 +5390,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5471,8 +5390,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(ops, i, value); asdl_seq_SET(ops, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ops\" missing from Compare"); PyErr_SetString(PyExc_TypeError, "required field \"ops\" missing from Compare");
return 1; return 1;
...@@ -5496,8 +5414,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5496,8 +5414,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(comparators, i, value); asdl_seq_SET(comparators, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"comparators\" missing from Compare"); PyErr_SetString(PyExc_TypeError, "required field \"comparators\" missing from Compare");
return 1; return 1;
...@@ -5523,8 +5440,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5523,8 +5440,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &func, arena); res = obj2ast_expr(tmp, &func, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"func\" missing from Call"); PyErr_SetString(PyExc_TypeError, "required field \"func\" missing from Call");
return 1; return 1;
...@@ -5548,8 +5464,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5548,8 +5464,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(args, i, value); asdl_seq_SET(args, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from Call"); PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from Call");
return 1; return 1;
...@@ -5573,8 +5488,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5573,8 +5488,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(keywords, i, value); asdl_seq_SET(keywords, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from Call"); PyErr_SetString(PyExc_TypeError, "required field \"keywords\" missing from Call");
return 1; return 1;
...@@ -5585,8 +5499,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5585,8 +5499,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &starargs, arena); res = obj2ast_expr(tmp, &starargs, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
starargs = NULL; starargs = NULL;
} }
...@@ -5596,8 +5509,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5596,8 +5509,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &kwargs, arena); res = obj2ast_expr(tmp, &kwargs, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
kwargs = NULL; kwargs = NULL;
} }
...@@ -5619,8 +5531,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5619,8 +5531,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_object(tmp, &n, arena); res = obj2ast_object(tmp, &n, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"n\" missing from Num"); PyErr_SetString(PyExc_TypeError, "required field \"n\" missing from Num");
return 1; return 1;
...@@ -5642,8 +5553,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5642,8 +5553,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_string(tmp, &s, arena); res = obj2ast_string(tmp, &s, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"s\" missing from Str"); PyErr_SetString(PyExc_TypeError, "required field \"s\" missing from Str");
return 1; return 1;
...@@ -5665,8 +5575,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5665,8 +5575,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_bytes(tmp, &s, arena); res = obj2ast_bytes(tmp, &s, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"s\" missing from Bytes"); PyErr_SetString(PyExc_TypeError, "required field \"s\" missing from Bytes");
return 1; return 1;
...@@ -5700,8 +5609,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5700,8 +5609,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Attribute"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Attribute");
return 1; return 1;
...@@ -5712,8 +5620,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5712,8 +5620,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &attr, arena); res = obj2ast_identifier(tmp, &attr, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"attr\" missing from Attribute"); PyErr_SetString(PyExc_TypeError, "required field \"attr\" missing from Attribute");
return 1; return 1;
...@@ -5724,8 +5631,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5724,8 +5631,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr_context(tmp, &ctx, arena); res = obj2ast_expr_context(tmp, &ctx, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Attribute"); PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Attribute");
return 1; return 1;
...@@ -5749,8 +5655,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5749,8 +5655,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Subscript"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Subscript");
return 1; return 1;
...@@ -5761,8 +5666,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5761,8 +5666,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_slice(tmp, &slice, arena); res = obj2ast_slice(tmp, &slice, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"slice\" missing from Subscript"); PyErr_SetString(PyExc_TypeError, "required field \"slice\" missing from Subscript");
return 1; return 1;
...@@ -5773,8 +5677,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5773,8 +5677,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr_context(tmp, &ctx, arena); res = obj2ast_expr_context(tmp, &ctx, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Subscript"); PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Subscript");
return 1; return 1;
...@@ -5797,8 +5700,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5797,8 +5700,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Starred"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Starred");
return 1; return 1;
...@@ -5809,8 +5711,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5809,8 +5711,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr_context(tmp, &ctx, arena); res = obj2ast_expr_context(tmp, &ctx, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Starred"); PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Starred");
return 1; return 1;
...@@ -5833,8 +5734,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5833,8 +5734,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &id, arena); res = obj2ast_identifier(tmp, &id, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"id\" missing from Name"); PyErr_SetString(PyExc_TypeError, "required field \"id\" missing from Name");
return 1; return 1;
...@@ -5845,8 +5745,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5845,8 +5745,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr_context(tmp, &ctx, arena); res = obj2ast_expr_context(tmp, &ctx, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Name"); PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Name");
return 1; return 1;
...@@ -5882,8 +5781,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5882,8 +5781,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(elts, i, value); asdl_seq_SET(elts, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from List"); PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from List");
return 1; return 1;
...@@ -5894,8 +5792,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5894,8 +5792,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr_context(tmp, &ctx, arena); res = obj2ast_expr_context(tmp, &ctx, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from List"); PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from List");
return 1; return 1;
...@@ -5931,8 +5828,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5931,8 +5828,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(elts, i, value); asdl_seq_SET(elts, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from Tuple"); PyErr_SetString(PyExc_TypeError, "required field \"elts\" missing from Tuple");
return 1; return 1;
...@@ -5943,8 +5839,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena) ...@@ -5943,8 +5839,7 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr_context(tmp, &ctx, arena); res = obj2ast_expr_context(tmp, &ctx, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Tuple"); PyErr_SetString(PyExc_TypeError, "required field \"ctx\" missing from Tuple");
return 1; return 1;
...@@ -6044,8 +5939,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena) ...@@ -6044,8 +5939,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &lower, arena); res = obj2ast_expr(tmp, &lower, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
lower = NULL; lower = NULL;
} }
...@@ -6055,8 +5949,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena) ...@@ -6055,8 +5949,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &upper, arena); res = obj2ast_expr(tmp, &upper, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
upper = NULL; upper = NULL;
} }
...@@ -6066,8 +5959,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena) ...@@ -6066,8 +5959,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &step, arena); res = obj2ast_expr(tmp, &step, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
step = NULL; step = NULL;
} }
...@@ -6101,8 +5993,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena) ...@@ -6101,8 +5993,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(dims, i, value); asdl_seq_SET(dims, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"dims\" missing from ExtSlice"); PyErr_SetString(PyExc_TypeError, "required field \"dims\" missing from ExtSlice");
return 1; return 1;
...@@ -6124,8 +6015,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena) ...@@ -6124,8 +6015,7 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Index"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from Index");
return 1; return 1;
...@@ -6419,8 +6309,7 @@ obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena* arena) ...@@ -6419,8 +6309,7 @@ obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &target, arena); res = obj2ast_expr(tmp, &target, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from comprehension"); PyErr_SetString(PyExc_TypeError, "required field \"target\" missing from comprehension");
return 1; return 1;
...@@ -6431,8 +6320,7 @@ obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena* arena) ...@@ -6431,8 +6320,7 @@ obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &iter, arena); res = obj2ast_expr(tmp, &iter, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from comprehension"); PyErr_SetString(PyExc_TypeError, "required field \"iter\" missing from comprehension");
return 1; return 1;
...@@ -6456,8 +6344,7 @@ obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena* arena) ...@@ -6456,8 +6344,7 @@ obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(ifs, i, value); asdl_seq_SET(ifs, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"ifs\" missing from comprehension"); PyErr_SetString(PyExc_TypeError, "required field \"ifs\" missing from comprehension");
return 1; return 1;
...@@ -6488,8 +6375,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena) ...@@ -6488,8 +6375,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_int(tmp, &lineno, arena); res = obj2ast_int(tmp, &lineno, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from excepthandler"); PyErr_SetString(PyExc_TypeError, "required field \"lineno\" missing from excepthandler");
return 1; return 1;
...@@ -6500,8 +6386,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena) ...@@ -6500,8 +6386,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_int(tmp, &col_offset, arena); res = obj2ast_int(tmp, &col_offset, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from excepthandler"); PyErr_SetString(PyExc_TypeError, "required field \"col_offset\" missing from excepthandler");
return 1; return 1;
...@@ -6521,8 +6406,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena) ...@@ -6521,8 +6406,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &type, arena); res = obj2ast_expr(tmp, &type, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
type = NULL; type = NULL;
} }
...@@ -6532,8 +6416,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena) ...@@ -6532,8 +6416,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &name, arena); res = obj2ast_identifier(tmp, &name, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
name = NULL; name = NULL;
} }
...@@ -6556,8 +6439,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena) ...@@ -6556,8 +6439,7 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ExceptHandler"); PyErr_SetString(PyExc_TypeError, "required field \"body\" missing from ExceptHandler");
return 1; return 1;
...@@ -6605,8 +6487,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6605,8 +6487,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(args, i, value); asdl_seq_SET(args, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from arguments"); PyErr_SetString(PyExc_TypeError, "required field \"args\" missing from arguments");
return 1; return 1;
...@@ -6617,8 +6498,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6617,8 +6498,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &vararg, arena); res = obj2ast_identifier(tmp, &vararg, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
vararg = NULL; vararg = NULL;
} }
...@@ -6628,8 +6508,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6628,8 +6508,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &varargannotation, arena); res = obj2ast_expr(tmp, &varargannotation, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
varargannotation = NULL; varargannotation = NULL;
} }
...@@ -6652,8 +6531,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6652,8 +6531,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(kwonlyargs, i, value); asdl_seq_SET(kwonlyargs, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"kwonlyargs\" missing from arguments"); PyErr_SetString(PyExc_TypeError, "required field \"kwonlyargs\" missing from arguments");
return 1; return 1;
...@@ -6664,8 +6542,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6664,8 +6542,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &kwarg, arena); res = obj2ast_identifier(tmp, &kwarg, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
kwarg = NULL; kwarg = NULL;
} }
...@@ -6675,8 +6552,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6675,8 +6552,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &kwargannotation, arena); res = obj2ast_expr(tmp, &kwargannotation, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
kwargannotation = NULL; kwargannotation = NULL;
} }
...@@ -6699,8 +6575,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6699,8 +6575,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(defaults, i, value); asdl_seq_SET(defaults, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"defaults\" missing from arguments"); PyErr_SetString(PyExc_TypeError, "required field \"defaults\" missing from arguments");
return 1; return 1;
...@@ -6724,8 +6599,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) ...@@ -6724,8 +6599,7 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
if (res != 0) goto failed; if (res != 0) goto failed;
asdl_seq_SET(kw_defaults, i, value); asdl_seq_SET(kw_defaults, i, value);
} }
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"kw_defaults\" missing from arguments"); PyErr_SetString(PyExc_TypeError, "required field \"kw_defaults\" missing from arguments");
return 1; return 1;
...@@ -6751,8 +6625,7 @@ obj2ast_arg(PyObject* obj, arg_ty* out, PyArena* arena) ...@@ -6751,8 +6625,7 @@ obj2ast_arg(PyObject* obj, arg_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &arg, arena); res = obj2ast_identifier(tmp, &arg, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from arg"); PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from arg");
return 1; return 1;
...@@ -6763,8 +6636,7 @@ obj2ast_arg(PyObject* obj, arg_ty* out, PyArena* arena) ...@@ -6763,8 +6636,7 @@ obj2ast_arg(PyObject* obj, arg_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &annotation, arena); res = obj2ast_expr(tmp, &annotation, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
annotation = NULL; annotation = NULL;
} }
...@@ -6788,8 +6660,7 @@ obj2ast_keyword(PyObject* obj, keyword_ty* out, PyArena* arena) ...@@ -6788,8 +6660,7 @@ obj2ast_keyword(PyObject* obj, keyword_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &arg, arena); res = obj2ast_identifier(tmp, &arg, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from keyword"); PyErr_SetString(PyExc_TypeError, "required field \"arg\" missing from keyword");
return 1; return 1;
...@@ -6800,8 +6671,7 @@ obj2ast_keyword(PyObject* obj, keyword_ty* out, PyArena* arena) ...@@ -6800,8 +6671,7 @@ obj2ast_keyword(PyObject* obj, keyword_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &value, arena); res = obj2ast_expr(tmp, &value, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from keyword"); PyErr_SetString(PyExc_TypeError, "required field \"value\" missing from keyword");
return 1; return 1;
...@@ -6826,8 +6696,7 @@ obj2ast_alias(PyObject* obj, alias_ty* out, PyArena* arena) ...@@ -6826,8 +6696,7 @@ obj2ast_alias(PyObject* obj, alias_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &name, arena); res = obj2ast_identifier(tmp, &name, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from alias"); PyErr_SetString(PyExc_TypeError, "required field \"name\" missing from alias");
return 1; return 1;
...@@ -6838,8 +6707,7 @@ obj2ast_alias(PyObject* obj, alias_ty* out, PyArena* arena) ...@@ -6838,8 +6707,7 @@ obj2ast_alias(PyObject* obj, alias_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_identifier(tmp, &asname, arena); res = obj2ast_identifier(tmp, &asname, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
asname = NULL; asname = NULL;
} }
...@@ -6863,8 +6731,7 @@ obj2ast_withitem(PyObject* obj, withitem_ty* out, PyArena* arena) ...@@ -6863,8 +6731,7 @@ obj2ast_withitem(PyObject* obj, withitem_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &context_expr, arena); res = obj2ast_expr(tmp, &context_expr, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
PyErr_SetString(PyExc_TypeError, "required field \"context_expr\" missing from withitem"); PyErr_SetString(PyExc_TypeError, "required field \"context_expr\" missing from withitem");
return 1; return 1;
...@@ -6875,8 +6742,7 @@ obj2ast_withitem(PyObject* obj, withitem_ty* out, PyArena* arena) ...@@ -6875,8 +6742,7 @@ obj2ast_withitem(PyObject* obj, withitem_ty* out, PyArena* arena)
if (tmp == NULL) goto failed; if (tmp == NULL) goto failed;
res = obj2ast_expr(tmp, &optional_vars, arena); res = obj2ast_expr(tmp, &optional_vars, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
Py_XDECREF(tmp); Py_CLEAR(tmp);
tmp = NULL;
} else { } else {
optional_vars = NULL; optional_vars = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment