Fix a shadow-compatible-local warning (#2180)

Change the shadowing naming, 'value' (Python-ast.c:4652), to 'val'
to prevent the variables from being misused.
This commit is contained in:
Yuan Chao Chou 2017-08-04 10:53:12 -07:00 committed by Łukasz Langa
parent c4c9866064
commit 2af565baf4
2 changed files with 168 additions and 168 deletions

View File

@ -522,8 +522,8 @@ class Obj2ModVisitor(PickleVisitor):
self.emit("%s = _Py_asdl_seq_new(len, arena);" % field.name, depth+1) self.emit("%s = _Py_asdl_seq_new(len, arena);" % field.name, depth+1)
self.emit("if (%s == NULL) goto failed;" % field.name, depth+1) self.emit("if (%s == NULL) goto failed;" % field.name, depth+1)
self.emit("for (i = 0; i < len; i++) {", depth+1) self.emit("for (i = 0; i < len; i++) {", depth+1)
self.emit("%s value;" % ctype, depth+2) self.emit("%s val;" % ctype, depth+2)
self.emit("res = obj2ast_%s(PyList_GET_ITEM(tmp, i), &value, arena);" % self.emit("res = obj2ast_%s(PyList_GET_ITEM(tmp, i), &val, arena);" %
field.type, depth+2, reflow=False) field.type, depth+2, reflow=False)
self.emit("if (res != 0) goto failed;", depth+2) self.emit("if (res != 0) goto failed;", depth+2)
self.emit("if (len != PyList_GET_SIZE(tmp)) {", depth+2) self.emit("if (len != PyList_GET_SIZE(tmp)) {", depth+2)
@ -533,7 +533,7 @@ class Obj2ModVisitor(PickleVisitor):
depth+3, reflow=False) depth+3, reflow=False)
self.emit("goto failed;", depth+3) self.emit("goto failed;", depth+3)
self.emit("}", depth+2) self.emit("}", depth+2)
self.emit("asdl_seq_SET(%s, i, value);" % field.name, depth+2) self.emit("asdl_seq_SET(%s, i, val);" % field.name, depth+2)
self.emit("}", depth+1) self.emit("}", depth+1)
else: else:
self.emit("res = obj2ast_%s(tmp, &%s, arena);" % self.emit("res = obj2ast_%s(tmp, &%s, arena);" %

View File

@ -4017,14 +4017,14 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Module field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Module field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4066,14 +4066,14 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Interactive field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Interactive field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4127,14 +4127,14 @@ obj2ast_mod(PyObject* obj, mod_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Suite field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Suite field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4235,14 +4235,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "FunctionDef field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "FunctionDef field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4263,14 +4263,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
decorator_list = _Py_asdl_seq_new(len, arena); decorator_list = _Py_asdl_seq_new(len, arena);
if (decorator_list == NULL) goto failed; if (decorator_list == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "FunctionDef field \"decorator_list\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "FunctionDef field \"decorator_list\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(decorator_list, i, value); asdl_seq_SET(decorator_list, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4350,14 +4350,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "AsyncFunctionDef field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "AsyncFunctionDef field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4378,14 +4378,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
decorator_list = _Py_asdl_seq_new(len, arena); decorator_list = _Py_asdl_seq_new(len, arena);
if (decorator_list == NULL) goto failed; if (decorator_list == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "AsyncFunctionDef field \"decorator_list\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "AsyncFunctionDef field \"decorator_list\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(decorator_list, i, value); asdl_seq_SET(decorator_list, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4454,14 +4454,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
bases = _Py_asdl_seq_new(len, arena); bases = _Py_asdl_seq_new(len, arena);
if (bases == NULL) goto failed; if (bases == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"bases\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"bases\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(bases, i, value); asdl_seq_SET(bases, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4482,14 +4482,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
keywords = _Py_asdl_seq_new(len, arena); keywords = _Py_asdl_seq_new(len, arena);
if (keywords == NULL) goto failed; if (keywords == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
keyword_ty value; keyword_ty val;
res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"keywords\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"keywords\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(keywords, i, value); asdl_seq_SET(keywords, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4510,14 +4510,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4538,14 +4538,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
decorator_list = _Py_asdl_seq_new(len, arena); decorator_list = _Py_asdl_seq_new(len, arena);
if (decorator_list == NULL) goto failed; if (decorator_list == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"decorator_list\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ClassDef field \"decorator_list\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(decorator_list, i, value); asdl_seq_SET(decorator_list, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4609,14 +4609,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
targets = _Py_asdl_seq_new(len, arena); targets = _Py_asdl_seq_new(len, arena);
if (targets == NULL) goto failed; if (targets == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Delete field \"targets\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Delete field \"targets\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(targets, i, value); asdl_seq_SET(targets, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4649,14 +4649,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
targets = _Py_asdl_seq_new(len, arena); targets = _Py_asdl_seq_new(len, arena);
if (targets == NULL) goto failed; if (targets == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Assign field \"targets\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Assign field \"targets\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(targets, i, value); asdl_seq_SET(targets, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4828,14 +4828,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "For field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "For field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4856,14 +4856,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
orelse = _Py_asdl_seq_new(len, arena); orelse = _Py_asdl_seq_new(len, arena);
if (orelse == NULL) goto failed; if (orelse == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "For field \"orelse\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "For field \"orelse\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4920,14 +4920,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "AsyncFor field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "AsyncFor field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -4948,14 +4948,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
orelse = _Py_asdl_seq_new(len, arena); orelse = _Py_asdl_seq_new(len, arena);
if (orelse == NULL) goto failed; if (orelse == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "AsyncFor field \"orelse\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "AsyncFor field \"orelse\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5000,14 +5000,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "While field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "While field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5028,14 +5028,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
orelse = _Py_asdl_seq_new(len, arena); orelse = _Py_asdl_seq_new(len, arena);
if (orelse == NULL) goto failed; if (orelse == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "While field \"orelse\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "While field \"orelse\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5080,14 +5080,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "If field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "If field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5108,14 +5108,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
orelse = _Py_asdl_seq_new(len, arena); orelse = _Py_asdl_seq_new(len, arena);
if (orelse == NULL) goto failed; if (orelse == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "If field \"orelse\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "If field \"orelse\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5148,14 +5148,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
items = _Py_asdl_seq_new(len, arena); items = _Py_asdl_seq_new(len, arena);
if (items == NULL) goto failed; if (items == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
withitem_ty value; withitem_ty val;
res = obj2ast_withitem(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_withitem(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "With field \"items\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "With field \"items\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(items, i, value); asdl_seq_SET(items, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5176,14 +5176,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "With field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "With field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5216,14 +5216,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
items = _Py_asdl_seq_new(len, arena); items = _Py_asdl_seq_new(len, arena);
if (items == NULL) goto failed; if (items == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
withitem_ty value; withitem_ty val;
res = obj2ast_withitem(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_withitem(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "AsyncWith field \"items\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "AsyncWith field \"items\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(items, i, value); asdl_seq_SET(items, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5244,14 +5244,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "AsyncWith field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "AsyncWith field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5318,14 +5318,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Try field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Try field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5346,14 +5346,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
handlers = _Py_asdl_seq_new(len, arena); handlers = _Py_asdl_seq_new(len, arena);
if (handlers == NULL) goto failed; if (handlers == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
excepthandler_ty value; excepthandler_ty val;
res = obj2ast_excepthandler(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_excepthandler(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Try field \"handlers\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Try field \"handlers\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(handlers, i, value); asdl_seq_SET(handlers, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5374,14 +5374,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
orelse = _Py_asdl_seq_new(len, arena); orelse = _Py_asdl_seq_new(len, arena);
if (orelse == NULL) goto failed; if (orelse == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Try field \"orelse\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Try field \"orelse\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(orelse, i, value); asdl_seq_SET(orelse, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5402,14 +5402,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
finalbody = _Py_asdl_seq_new(len, arena); finalbody = _Py_asdl_seq_new(len, arena);
if (finalbody == NULL) goto failed; if (finalbody == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Try field \"finalbody\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Try field \"finalbody\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(finalbody, i, value); asdl_seq_SET(finalbody, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5475,14 +5475,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
names = _Py_asdl_seq_new(len, arena); names = _Py_asdl_seq_new(len, arena);
if (names == NULL) goto failed; if (names == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
alias_ty value; alias_ty val;
res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Import field \"names\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Import field \"names\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5526,14 +5526,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
names = _Py_asdl_seq_new(len, arena); names = _Py_asdl_seq_new(len, arena);
if (names == NULL) goto failed; if (names == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
alias_ty value; alias_ty val;
res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ImportFrom field \"names\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ImportFrom field \"names\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5575,14 +5575,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
names = _Py_asdl_seq_new(len, arena); names = _Py_asdl_seq_new(len, arena);
if (names == NULL) goto failed; if (names == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
identifier value; identifier val;
res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Global field \"names\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Global field \"names\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5614,14 +5614,14 @@ obj2ast_stmt(PyObject* obj, stmt_ty* out, PyArena* arena)
names = _Py_asdl_seq_new(len, arena); names = _Py_asdl_seq_new(len, arena);
if (names == NULL) goto failed; if (names == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
identifier value; identifier val;
res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Nonlocal field \"names\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Nonlocal field \"names\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(names, i, value); asdl_seq_SET(names, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5759,14 +5759,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
values = _Py_asdl_seq_new(len, arena); values = _Py_asdl_seq_new(len, arena);
if (values == NULL) goto failed; if (values == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "BoolOp field \"values\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "BoolOp field \"values\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(values, i, value); asdl_seq_SET(values, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5959,14 +5959,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
keys = _Py_asdl_seq_new(len, arena); keys = _Py_asdl_seq_new(len, arena);
if (keys == NULL) goto failed; if (keys == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Dict field \"keys\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Dict field \"keys\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(keys, i, value); asdl_seq_SET(keys, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -5987,14 +5987,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
values = _Py_asdl_seq_new(len, arena); values = _Py_asdl_seq_new(len, arena);
if (values == NULL) goto failed; if (values == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Dict field \"values\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Dict field \"values\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(values, i, value); asdl_seq_SET(values, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6026,14 +6026,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
elts = _Py_asdl_seq_new(len, arena); elts = _Py_asdl_seq_new(len, arena);
if (elts == NULL) goto failed; if (elts == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Set field \"elts\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Set field \"elts\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(elts, i, value); asdl_seq_SET(elts, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6077,14 +6077,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
generators = _Py_asdl_seq_new(len, arena); generators = _Py_asdl_seq_new(len, arena);
if (generators == NULL) goto failed; if (generators == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
comprehension_ty value; comprehension_ty val;
res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ListComp field \"generators\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ListComp field \"generators\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6128,14 +6128,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
generators = _Py_asdl_seq_new(len, arena); generators = _Py_asdl_seq_new(len, arena);
if (generators == NULL) goto failed; if (generators == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
comprehension_ty value; comprehension_ty val;
res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "SetComp field \"generators\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "SetComp field \"generators\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6191,14 +6191,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
generators = _Py_asdl_seq_new(len, arena); generators = _Py_asdl_seq_new(len, arena);
if (generators == NULL) goto failed; if (generators == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
comprehension_ty value; comprehension_ty val;
res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "DictComp field \"generators\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "DictComp field \"generators\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6242,14 +6242,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
generators = _Py_asdl_seq_new(len, arena); generators = _Py_asdl_seq_new(len, arena);
if (generators == NULL) goto failed; if (generators == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
comprehension_ty value; comprehension_ty val;
res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "GeneratorExp field \"generators\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "GeneratorExp field \"generators\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(generators, i, value); asdl_seq_SET(generators, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6359,14 +6359,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
ops = _Py_asdl_int_seq_new(len, arena); ops = _Py_asdl_int_seq_new(len, arena);
if (ops == NULL) goto failed; if (ops == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
cmpop_ty value; cmpop_ty val;
res = obj2ast_cmpop(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_cmpop(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Compare field \"ops\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Compare field \"ops\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(ops, i, value); asdl_seq_SET(ops, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6387,14 +6387,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
comparators = _Py_asdl_seq_new(len, arena); comparators = _Py_asdl_seq_new(len, arena);
if (comparators == NULL) goto failed; if (comparators == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Compare field \"comparators\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Compare field \"comparators\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(comparators, i, value); asdl_seq_SET(comparators, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6439,14 +6439,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
args = _Py_asdl_seq_new(len, arena); args = _Py_asdl_seq_new(len, arena);
if (args == NULL) goto failed; if (args == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Call field \"args\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Call field \"args\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(args, i, value); asdl_seq_SET(args, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6467,14 +6467,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
keywords = _Py_asdl_seq_new(len, arena); keywords = _Py_asdl_seq_new(len, arena);
if (keywords == NULL) goto failed; if (keywords == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
keyword_ty value; keyword_ty val;
res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Call field \"keywords\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Call field \"keywords\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(keywords, i, value); asdl_seq_SET(keywords, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6595,14 +6595,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
values = _Py_asdl_seq_new(len, arena); values = _Py_asdl_seq_new(len, arena);
if (values == NULL) goto failed; if (values == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "JoinedStr field \"values\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "JoinedStr field \"values\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(values, i, value); asdl_seq_SET(values, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6871,14 +6871,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
elts = _Py_asdl_seq_new(len, arena); elts = _Py_asdl_seq_new(len, arena);
if (elts == NULL) goto failed; if (elts == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "List field \"elts\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "List field \"elts\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(elts, i, value); asdl_seq_SET(elts, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -6922,14 +6922,14 @@ obj2ast_expr(PyObject* obj, expr_ty* out, PyArena* arena)
elts = _Py_asdl_seq_new(len, arena); elts = _Py_asdl_seq_new(len, arena);
if (elts == NULL) goto failed; if (elts == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "Tuple field \"elts\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "Tuple field \"elts\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(elts, i, value); asdl_seq_SET(elts, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -7091,14 +7091,14 @@ obj2ast_slice(PyObject* obj, slice_ty* out, PyArena* arena)
dims = _Py_asdl_seq_new(len, arena); dims = _Py_asdl_seq_new(len, arena);
if (dims == NULL) goto failed; if (dims == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
slice_ty value; slice_ty val;
res = obj2ast_slice(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_slice(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ExtSlice field \"dims\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ExtSlice field \"dims\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(dims, i, value); asdl_seq_SET(dims, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -7455,14 +7455,14 @@ obj2ast_comprehension(PyObject* obj, comprehension_ty* out, PyArena* arena)
ifs = _Py_asdl_seq_new(len, arena); ifs = _Py_asdl_seq_new(len, arena);
if (ifs == NULL) goto failed; if (ifs == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "comprehension field \"ifs\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "comprehension field \"ifs\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(ifs, i, value); asdl_seq_SET(ifs, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -7565,14 +7565,14 @@ obj2ast_excepthandler(PyObject* obj, excepthandler_ty* out, PyArena* arena)
body = _Py_asdl_seq_new(len, arena); body = _Py_asdl_seq_new(len, arena);
if (body == NULL) goto failed; if (body == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
stmt_ty value; stmt_ty val;
res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "ExceptHandler field \"body\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "ExceptHandler field \"body\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(body, i, value); asdl_seq_SET(body, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -7615,14 +7615,14 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
args = _Py_asdl_seq_new(len, arena); args = _Py_asdl_seq_new(len, arena);
if (args == NULL) goto failed; if (args == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
arg_ty value; arg_ty val;
res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "arguments field \"args\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "arguments field \"args\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(args, i, value); asdl_seq_SET(args, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -7653,14 +7653,14 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
kwonlyargs = _Py_asdl_seq_new(len, arena); kwonlyargs = _Py_asdl_seq_new(len, arena);
if (kwonlyargs == NULL) goto failed; if (kwonlyargs == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
arg_ty value; arg_ty val;
res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "arguments field \"kwonlyargs\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "arguments field \"kwonlyargs\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(kwonlyargs, i, value); asdl_seq_SET(kwonlyargs, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -7681,14 +7681,14 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
kw_defaults = _Py_asdl_seq_new(len, arena); kw_defaults = _Py_asdl_seq_new(len, arena);
if (kw_defaults == NULL) goto failed; if (kw_defaults == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "arguments field \"kw_defaults\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "arguments field \"kw_defaults\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(kw_defaults, i, value); asdl_seq_SET(kw_defaults, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {
@ -7719,14 +7719,14 @@ obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena)
defaults = _Py_asdl_seq_new(len, arena); defaults = _Py_asdl_seq_new(len, arena);
if (defaults == NULL) goto failed; if (defaults == NULL) goto failed;
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
expr_ty value; expr_ty val;
res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena);
if (res != 0) goto failed; if (res != 0) goto failed;
if (len != PyList_GET_SIZE(tmp)) { if (len != PyList_GET_SIZE(tmp)) {
PyErr_SetString(PyExc_RuntimeError, "arguments field \"defaults\" changed size during iteration"); PyErr_SetString(PyExc_RuntimeError, "arguments field \"defaults\" changed size during iteration");
goto failed; goto failed;
} }
asdl_seq_SET(defaults, i, value); asdl_seq_SET(defaults, i, val);
} }
Py_CLEAR(tmp); Py_CLEAR(tmp);
} else { } else {