Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 86258:142c62a490ce
Issue #4555: All exported C symbols are now prefixed with either "Py" or "_Py".
("make smelly" now clean)
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sat, 12 Oct 2013 22:52:43 +0200 |
| parents | ad90fc28769a |
| children |
comparison
equal
deleted
inserted
replaced
| 86257:eeec58c57964 | 86258:142c62a490ce |
|---|---|
| 3610 if (!PyList_Check(tmp)) { | 3610 if (!PyList_Check(tmp)) { |
| 3611 PyErr_Format(PyExc_TypeError, "Module field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3611 PyErr_Format(PyExc_TypeError, "Module field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3612 goto failed; | 3612 goto failed; |
| 3613 } | 3613 } |
| 3614 len = PyList_GET_SIZE(tmp); | 3614 len = PyList_GET_SIZE(tmp); |
| 3615 body = asdl_seq_new(len, arena); | 3615 body = _Py_asdl_seq_new(len, arena); |
| 3616 if (body == NULL) goto failed; | 3616 if (body == NULL) goto failed; |
| 3617 for (i = 0; i < len; i++) { | 3617 for (i = 0; i < len; i++) { |
| 3618 stmt_ty value; | 3618 stmt_ty value; |
| 3619 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 3619 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3620 if (res != 0) goto failed; | 3620 if (res != 0) goto failed; |
| 3645 if (!PyList_Check(tmp)) { | 3645 if (!PyList_Check(tmp)) { |
| 3646 PyErr_Format(PyExc_TypeError, "Interactive field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3646 PyErr_Format(PyExc_TypeError, "Interactive field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3647 goto failed; | 3647 goto failed; |
| 3648 } | 3648 } |
| 3649 len = PyList_GET_SIZE(tmp); | 3649 len = PyList_GET_SIZE(tmp); |
| 3650 body = asdl_seq_new(len, arena); | 3650 body = _Py_asdl_seq_new(len, arena); |
| 3651 if (body == NULL) goto failed; | 3651 if (body == NULL) goto failed; |
| 3652 for (i = 0; i < len; i++) { | 3652 for (i = 0; i < len; i++) { |
| 3653 stmt_ty value; | 3653 stmt_ty value; |
| 3654 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 3654 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3655 if (res != 0) goto failed; | 3655 if (res != 0) goto failed; |
| 3702 if (!PyList_Check(tmp)) { | 3702 if (!PyList_Check(tmp)) { |
| 3703 PyErr_Format(PyExc_TypeError, "Suite field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3703 PyErr_Format(PyExc_TypeError, "Suite field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3704 goto failed; | 3704 goto failed; |
| 3705 } | 3705 } |
| 3706 len = PyList_GET_SIZE(tmp); | 3706 len = PyList_GET_SIZE(tmp); |
| 3707 body = asdl_seq_new(len, arena); | 3707 body = _Py_asdl_seq_new(len, arena); |
| 3708 if (body == NULL) goto failed; | 3708 if (body == NULL) goto failed; |
| 3709 for (i = 0; i < len; i++) { | 3709 for (i = 0; i < len; i++) { |
| 3710 stmt_ty value; | 3710 stmt_ty value; |
| 3711 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 3711 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3712 if (res != 0) goto failed; | 3712 if (res != 0) goto failed; |
| 3805 if (!PyList_Check(tmp)) { | 3805 if (!PyList_Check(tmp)) { |
| 3806 PyErr_Format(PyExc_TypeError, "FunctionDef field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3806 PyErr_Format(PyExc_TypeError, "FunctionDef field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3807 goto failed; | 3807 goto failed; |
| 3808 } | 3808 } |
| 3809 len = PyList_GET_SIZE(tmp); | 3809 len = PyList_GET_SIZE(tmp); |
| 3810 body = asdl_seq_new(len, arena); | 3810 body = _Py_asdl_seq_new(len, arena); |
| 3811 if (body == NULL) goto failed; | 3811 if (body == NULL) goto failed; |
| 3812 for (i = 0; i < len; i++) { | 3812 for (i = 0; i < len; i++) { |
| 3813 stmt_ty value; | 3813 stmt_ty value; |
| 3814 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 3814 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3815 if (res != 0) goto failed; | 3815 if (res != 0) goto failed; |
| 3829 if (!PyList_Check(tmp)) { | 3829 if (!PyList_Check(tmp)) { |
| 3830 PyErr_Format(PyExc_TypeError, "FunctionDef field \"decorator_list\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3830 PyErr_Format(PyExc_TypeError, "FunctionDef field \"decorator_list\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3831 goto failed; | 3831 goto failed; |
| 3832 } | 3832 } |
| 3833 len = PyList_GET_SIZE(tmp); | 3833 len = PyList_GET_SIZE(tmp); |
| 3834 decorator_list = asdl_seq_new(len, arena); | 3834 decorator_list = _Py_asdl_seq_new(len, arena); |
| 3835 if (decorator_list == NULL) goto failed; | 3835 if (decorator_list == NULL) goto failed; |
| 3836 for (i = 0; i < len; i++) { | 3836 for (i = 0; i < len; i++) { |
| 3837 expr_ty value; | 3837 expr_ty value; |
| 3838 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 3838 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3839 if (res != 0) goto failed; | 3839 if (res != 0) goto failed; |
| 3892 if (!PyList_Check(tmp)) { | 3892 if (!PyList_Check(tmp)) { |
| 3893 PyErr_Format(PyExc_TypeError, "ClassDef field \"bases\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3893 PyErr_Format(PyExc_TypeError, "ClassDef field \"bases\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3894 goto failed; | 3894 goto failed; |
| 3895 } | 3895 } |
| 3896 len = PyList_GET_SIZE(tmp); | 3896 len = PyList_GET_SIZE(tmp); |
| 3897 bases = asdl_seq_new(len, arena); | 3897 bases = _Py_asdl_seq_new(len, arena); |
| 3898 if (bases == NULL) goto failed; | 3898 if (bases == NULL) goto failed; |
| 3899 for (i = 0; i < len; i++) { | 3899 for (i = 0; i < len; i++) { |
| 3900 expr_ty value; | 3900 expr_ty value; |
| 3901 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 3901 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3902 if (res != 0) goto failed; | 3902 if (res != 0) goto failed; |
| 3916 if (!PyList_Check(tmp)) { | 3916 if (!PyList_Check(tmp)) { |
| 3917 PyErr_Format(PyExc_TypeError, "ClassDef field \"keywords\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3917 PyErr_Format(PyExc_TypeError, "ClassDef field \"keywords\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3918 goto failed; | 3918 goto failed; |
| 3919 } | 3919 } |
| 3920 len = PyList_GET_SIZE(tmp); | 3920 len = PyList_GET_SIZE(tmp); |
| 3921 keywords = asdl_seq_new(len, arena); | 3921 keywords = _Py_asdl_seq_new(len, arena); |
| 3922 if (keywords == NULL) goto failed; | 3922 if (keywords == NULL) goto failed; |
| 3923 for (i = 0; i < len; i++) { | 3923 for (i = 0; i < len; i++) { |
| 3924 keyword_ty value; | 3924 keyword_ty value; |
| 3925 res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &value, arena); | 3925 res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3926 if (res != 0) goto failed; | 3926 if (res != 0) goto failed; |
| 3960 if (!PyList_Check(tmp)) { | 3960 if (!PyList_Check(tmp)) { |
| 3961 PyErr_Format(PyExc_TypeError, "ClassDef field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3961 PyErr_Format(PyExc_TypeError, "ClassDef field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3962 goto failed; | 3962 goto failed; |
| 3963 } | 3963 } |
| 3964 len = PyList_GET_SIZE(tmp); | 3964 len = PyList_GET_SIZE(tmp); |
| 3965 body = asdl_seq_new(len, arena); | 3965 body = _Py_asdl_seq_new(len, arena); |
| 3966 if (body == NULL) goto failed; | 3966 if (body == NULL) goto failed; |
| 3967 for (i = 0; i < len; i++) { | 3967 for (i = 0; i < len; i++) { |
| 3968 stmt_ty value; | 3968 stmt_ty value; |
| 3969 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 3969 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3970 if (res != 0) goto failed; | 3970 if (res != 0) goto failed; |
| 3984 if (!PyList_Check(tmp)) { | 3984 if (!PyList_Check(tmp)) { |
| 3985 PyErr_Format(PyExc_TypeError, "ClassDef field \"decorator_list\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 3985 PyErr_Format(PyExc_TypeError, "ClassDef field \"decorator_list\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 3986 goto failed; | 3986 goto failed; |
| 3987 } | 3987 } |
| 3988 len = PyList_GET_SIZE(tmp); | 3988 len = PyList_GET_SIZE(tmp); |
| 3989 decorator_list = asdl_seq_new(len, arena); | 3989 decorator_list = _Py_asdl_seq_new(len, arena); |
| 3990 if (decorator_list == NULL) goto failed; | 3990 if (decorator_list == NULL) goto failed; |
| 3991 for (i = 0; i < len; i++) { | 3991 for (i = 0; i < len; i++) { |
| 3992 expr_ty value; | 3992 expr_ty value; |
| 3993 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 3993 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 3994 if (res != 0) goto failed; | 3994 if (res != 0) goto failed; |
| 4041 if (!PyList_Check(tmp)) { | 4041 if (!PyList_Check(tmp)) { |
| 4042 PyErr_Format(PyExc_TypeError, "Delete field \"targets\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4042 PyErr_Format(PyExc_TypeError, "Delete field \"targets\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4043 goto failed; | 4043 goto failed; |
| 4044 } | 4044 } |
| 4045 len = PyList_GET_SIZE(tmp); | 4045 len = PyList_GET_SIZE(tmp); |
| 4046 targets = asdl_seq_new(len, arena); | 4046 targets = _Py_asdl_seq_new(len, arena); |
| 4047 if (targets == NULL) goto failed; | 4047 if (targets == NULL) goto failed; |
| 4048 for (i = 0; i < len; i++) { | 4048 for (i = 0; i < len; i++) { |
| 4049 expr_ty value; | 4049 expr_ty value; |
| 4050 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 4050 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4051 if (res != 0) goto failed; | 4051 if (res != 0) goto failed; |
| 4077 if (!PyList_Check(tmp)) { | 4077 if (!PyList_Check(tmp)) { |
| 4078 PyErr_Format(PyExc_TypeError, "Assign field \"targets\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4078 PyErr_Format(PyExc_TypeError, "Assign field \"targets\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4079 goto failed; | 4079 goto failed; |
| 4080 } | 4080 } |
| 4081 len = PyList_GET_SIZE(tmp); | 4081 len = PyList_GET_SIZE(tmp); |
| 4082 targets = asdl_seq_new(len, arena); | 4082 targets = _Py_asdl_seq_new(len, arena); |
| 4083 if (targets == NULL) goto failed; | 4083 if (targets == NULL) goto failed; |
| 4084 for (i = 0; i < len; i++) { | 4084 for (i = 0; i < len; i++) { |
| 4085 expr_ty value; | 4085 expr_ty value; |
| 4086 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 4086 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4087 if (res != 0) goto failed; | 4087 if (res != 0) goto failed; |
| 4194 if (!PyList_Check(tmp)) { | 4194 if (!PyList_Check(tmp)) { |
| 4195 PyErr_Format(PyExc_TypeError, "For field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4195 PyErr_Format(PyExc_TypeError, "For field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4196 goto failed; | 4196 goto failed; |
| 4197 } | 4197 } |
| 4198 len = PyList_GET_SIZE(tmp); | 4198 len = PyList_GET_SIZE(tmp); |
| 4199 body = asdl_seq_new(len, arena); | 4199 body = _Py_asdl_seq_new(len, arena); |
| 4200 if (body == NULL) goto failed; | 4200 if (body == NULL) goto failed; |
| 4201 for (i = 0; i < len; i++) { | 4201 for (i = 0; i < len; i++) { |
| 4202 stmt_ty value; | 4202 stmt_ty value; |
| 4203 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4203 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4204 if (res != 0) goto failed; | 4204 if (res != 0) goto failed; |
| 4218 if (!PyList_Check(tmp)) { | 4218 if (!PyList_Check(tmp)) { |
| 4219 PyErr_Format(PyExc_TypeError, "For field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4219 PyErr_Format(PyExc_TypeError, "For field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4220 goto failed; | 4220 goto failed; |
| 4221 } | 4221 } |
| 4222 len = PyList_GET_SIZE(tmp); | 4222 len = PyList_GET_SIZE(tmp); |
| 4223 orelse = asdl_seq_new(len, arena); | 4223 orelse = _Py_asdl_seq_new(len, arena); |
| 4224 if (orelse == NULL) goto failed; | 4224 if (orelse == NULL) goto failed; |
| 4225 for (i = 0; i < len; i++) { | 4225 for (i = 0; i < len; i++) { |
| 4226 stmt_ty value; | 4226 stmt_ty value; |
| 4227 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4227 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4228 if (res != 0) goto failed; | 4228 if (res != 0) goto failed; |
| 4266 if (!PyList_Check(tmp)) { | 4266 if (!PyList_Check(tmp)) { |
| 4267 PyErr_Format(PyExc_TypeError, "While field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4267 PyErr_Format(PyExc_TypeError, "While field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4268 goto failed; | 4268 goto failed; |
| 4269 } | 4269 } |
| 4270 len = PyList_GET_SIZE(tmp); | 4270 len = PyList_GET_SIZE(tmp); |
| 4271 body = asdl_seq_new(len, arena); | 4271 body = _Py_asdl_seq_new(len, arena); |
| 4272 if (body == NULL) goto failed; | 4272 if (body == NULL) goto failed; |
| 4273 for (i = 0; i < len; i++) { | 4273 for (i = 0; i < len; i++) { |
| 4274 stmt_ty value; | 4274 stmt_ty value; |
| 4275 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4275 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4276 if (res != 0) goto failed; | 4276 if (res != 0) goto failed; |
| 4290 if (!PyList_Check(tmp)) { | 4290 if (!PyList_Check(tmp)) { |
| 4291 PyErr_Format(PyExc_TypeError, "While field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4291 PyErr_Format(PyExc_TypeError, "While field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4292 goto failed; | 4292 goto failed; |
| 4293 } | 4293 } |
| 4294 len = PyList_GET_SIZE(tmp); | 4294 len = PyList_GET_SIZE(tmp); |
| 4295 orelse = asdl_seq_new(len, arena); | 4295 orelse = _Py_asdl_seq_new(len, arena); |
| 4296 if (orelse == NULL) goto failed; | 4296 if (orelse == NULL) goto failed; |
| 4297 for (i = 0; i < len; i++) { | 4297 for (i = 0; i < len; i++) { |
| 4298 stmt_ty value; | 4298 stmt_ty value; |
| 4299 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4299 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4300 if (res != 0) goto failed; | 4300 if (res != 0) goto failed; |
| 4338 if (!PyList_Check(tmp)) { | 4338 if (!PyList_Check(tmp)) { |
| 4339 PyErr_Format(PyExc_TypeError, "If field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4339 PyErr_Format(PyExc_TypeError, "If field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4340 goto failed; | 4340 goto failed; |
| 4341 } | 4341 } |
| 4342 len = PyList_GET_SIZE(tmp); | 4342 len = PyList_GET_SIZE(tmp); |
| 4343 body = asdl_seq_new(len, arena); | 4343 body = _Py_asdl_seq_new(len, arena); |
| 4344 if (body == NULL) goto failed; | 4344 if (body == NULL) goto failed; |
| 4345 for (i = 0; i < len; i++) { | 4345 for (i = 0; i < len; i++) { |
| 4346 stmt_ty value; | 4346 stmt_ty value; |
| 4347 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4347 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4348 if (res != 0) goto failed; | 4348 if (res != 0) goto failed; |
| 4362 if (!PyList_Check(tmp)) { | 4362 if (!PyList_Check(tmp)) { |
| 4363 PyErr_Format(PyExc_TypeError, "If field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4363 PyErr_Format(PyExc_TypeError, "If field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4364 goto failed; | 4364 goto failed; |
| 4365 } | 4365 } |
| 4366 len = PyList_GET_SIZE(tmp); | 4366 len = PyList_GET_SIZE(tmp); |
| 4367 orelse = asdl_seq_new(len, arena); | 4367 orelse = _Py_asdl_seq_new(len, arena); |
| 4368 if (orelse == NULL) goto failed; | 4368 if (orelse == NULL) goto failed; |
| 4369 for (i = 0; i < len; i++) { | 4369 for (i = 0; i < len; i++) { |
| 4370 stmt_ty value; | 4370 stmt_ty value; |
| 4371 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4371 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4372 if (res != 0) goto failed; | 4372 if (res != 0) goto failed; |
| 4398 if (!PyList_Check(tmp)) { | 4398 if (!PyList_Check(tmp)) { |
| 4399 PyErr_Format(PyExc_TypeError, "With field \"items\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4399 PyErr_Format(PyExc_TypeError, "With field \"items\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4400 goto failed; | 4400 goto failed; |
| 4401 } | 4401 } |
| 4402 len = PyList_GET_SIZE(tmp); | 4402 len = PyList_GET_SIZE(tmp); |
| 4403 items = asdl_seq_new(len, arena); | 4403 items = _Py_asdl_seq_new(len, arena); |
| 4404 if (items == NULL) goto failed; | 4404 if (items == NULL) goto failed; |
| 4405 for (i = 0; i < len; i++) { | 4405 for (i = 0; i < len; i++) { |
| 4406 withitem_ty value; | 4406 withitem_ty value; |
| 4407 res = obj2ast_withitem(PyList_GET_ITEM(tmp, i), &value, arena); | 4407 res = obj2ast_withitem(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4408 if (res != 0) goto failed; | 4408 if (res != 0) goto failed; |
| 4422 if (!PyList_Check(tmp)) { | 4422 if (!PyList_Check(tmp)) { |
| 4423 PyErr_Format(PyExc_TypeError, "With field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4423 PyErr_Format(PyExc_TypeError, "With field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4424 goto failed; | 4424 goto failed; |
| 4425 } | 4425 } |
| 4426 len = PyList_GET_SIZE(tmp); | 4426 len = PyList_GET_SIZE(tmp); |
| 4427 body = asdl_seq_new(len, arena); | 4427 body = _Py_asdl_seq_new(len, arena); |
| 4428 if (body == NULL) goto failed; | 4428 if (body == NULL) goto failed; |
| 4429 for (i = 0; i < len; i++) { | 4429 for (i = 0; i < len; i++) { |
| 4430 stmt_ty value; | 4430 stmt_ty value; |
| 4431 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4431 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4432 if (res != 0) goto failed; | 4432 if (res != 0) goto failed; |
| 4492 if (!PyList_Check(tmp)) { | 4492 if (!PyList_Check(tmp)) { |
| 4493 PyErr_Format(PyExc_TypeError, "Try field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4493 PyErr_Format(PyExc_TypeError, "Try field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4494 goto failed; | 4494 goto failed; |
| 4495 } | 4495 } |
| 4496 len = PyList_GET_SIZE(tmp); | 4496 len = PyList_GET_SIZE(tmp); |
| 4497 body = asdl_seq_new(len, arena); | 4497 body = _Py_asdl_seq_new(len, arena); |
| 4498 if (body == NULL) goto failed; | 4498 if (body == NULL) goto failed; |
| 4499 for (i = 0; i < len; i++) { | 4499 for (i = 0; i < len; i++) { |
| 4500 stmt_ty value; | 4500 stmt_ty value; |
| 4501 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4501 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4502 if (res != 0) goto failed; | 4502 if (res != 0) goto failed; |
| 4516 if (!PyList_Check(tmp)) { | 4516 if (!PyList_Check(tmp)) { |
| 4517 PyErr_Format(PyExc_TypeError, "Try field \"handlers\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4517 PyErr_Format(PyExc_TypeError, "Try field \"handlers\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4518 goto failed; | 4518 goto failed; |
| 4519 } | 4519 } |
| 4520 len = PyList_GET_SIZE(tmp); | 4520 len = PyList_GET_SIZE(tmp); |
| 4521 handlers = asdl_seq_new(len, arena); | 4521 handlers = _Py_asdl_seq_new(len, arena); |
| 4522 if (handlers == NULL) goto failed; | 4522 if (handlers == NULL) goto failed; |
| 4523 for (i = 0; i < len; i++) { | 4523 for (i = 0; i < len; i++) { |
| 4524 excepthandler_ty value; | 4524 excepthandler_ty value; |
| 4525 res = obj2ast_excepthandler(PyList_GET_ITEM(tmp, i), &value, arena); | 4525 res = obj2ast_excepthandler(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4526 if (res != 0) goto failed; | 4526 if (res != 0) goto failed; |
| 4540 if (!PyList_Check(tmp)) { | 4540 if (!PyList_Check(tmp)) { |
| 4541 PyErr_Format(PyExc_TypeError, "Try field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4541 PyErr_Format(PyExc_TypeError, "Try field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4542 goto failed; | 4542 goto failed; |
| 4543 } | 4543 } |
| 4544 len = PyList_GET_SIZE(tmp); | 4544 len = PyList_GET_SIZE(tmp); |
| 4545 orelse = asdl_seq_new(len, arena); | 4545 orelse = _Py_asdl_seq_new(len, arena); |
| 4546 if (orelse == NULL) goto failed; | 4546 if (orelse == NULL) goto failed; |
| 4547 for (i = 0; i < len; i++) { | 4547 for (i = 0; i < len; i++) { |
| 4548 stmt_ty value; | 4548 stmt_ty value; |
| 4549 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4549 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4550 if (res != 0) goto failed; | 4550 if (res != 0) goto failed; |
| 4564 if (!PyList_Check(tmp)) { | 4564 if (!PyList_Check(tmp)) { |
| 4565 PyErr_Format(PyExc_TypeError, "Try field \"finalbody\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4565 PyErr_Format(PyExc_TypeError, "Try field \"finalbody\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4566 goto failed; | 4566 goto failed; |
| 4567 } | 4567 } |
| 4568 len = PyList_GET_SIZE(tmp); | 4568 len = PyList_GET_SIZE(tmp); |
| 4569 finalbody = asdl_seq_new(len, arena); | 4569 finalbody = _Py_asdl_seq_new(len, arena); |
| 4570 if (finalbody == NULL) goto failed; | 4570 if (finalbody == NULL) goto failed; |
| 4571 for (i = 0; i < len; i++) { | 4571 for (i = 0; i < len; i++) { |
| 4572 stmt_ty value; | 4572 stmt_ty value; |
| 4573 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 4573 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4574 if (res != 0) goto failed; | 4574 if (res != 0) goto failed; |
| 4633 if (!PyList_Check(tmp)) { | 4633 if (!PyList_Check(tmp)) { |
| 4634 PyErr_Format(PyExc_TypeError, "Import field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4634 PyErr_Format(PyExc_TypeError, "Import field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4635 goto failed; | 4635 goto failed; |
| 4636 } | 4636 } |
| 4637 len = PyList_GET_SIZE(tmp); | 4637 len = PyList_GET_SIZE(tmp); |
| 4638 names = asdl_seq_new(len, arena); | 4638 names = _Py_asdl_seq_new(len, arena); |
| 4639 if (names == NULL) goto failed; | 4639 if (names == NULL) goto failed; |
| 4640 for (i = 0; i < len; i++) { | 4640 for (i = 0; i < len; i++) { |
| 4641 alias_ty value; | 4641 alias_ty value; |
| 4642 res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &value, arena); | 4642 res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4643 if (res != 0) goto failed; | 4643 if (res != 0) goto failed; |
| 4680 if (!PyList_Check(tmp)) { | 4680 if (!PyList_Check(tmp)) { |
| 4681 PyErr_Format(PyExc_TypeError, "ImportFrom field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4681 PyErr_Format(PyExc_TypeError, "ImportFrom field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4682 goto failed; | 4682 goto failed; |
| 4683 } | 4683 } |
| 4684 len = PyList_GET_SIZE(tmp); | 4684 len = PyList_GET_SIZE(tmp); |
| 4685 names = asdl_seq_new(len, arena); | 4685 names = _Py_asdl_seq_new(len, arena); |
| 4686 if (names == NULL) goto failed; | 4686 if (names == NULL) goto failed; |
| 4687 for (i = 0; i < len; i++) { | 4687 for (i = 0; i < len; i++) { |
| 4688 alias_ty value; | 4688 alias_ty value; |
| 4689 res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &value, arena); | 4689 res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4690 if (res != 0) goto failed; | 4690 if (res != 0) goto failed; |
| 4725 if (!PyList_Check(tmp)) { | 4725 if (!PyList_Check(tmp)) { |
| 4726 PyErr_Format(PyExc_TypeError, "Global field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4726 PyErr_Format(PyExc_TypeError, "Global field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4727 goto failed; | 4727 goto failed; |
| 4728 } | 4728 } |
| 4729 len = PyList_GET_SIZE(tmp); | 4729 len = PyList_GET_SIZE(tmp); |
| 4730 names = asdl_seq_new(len, arena); | 4730 names = _Py_asdl_seq_new(len, arena); |
| 4731 if (names == NULL) goto failed; | 4731 if (names == NULL) goto failed; |
| 4732 for (i = 0; i < len; i++) { | 4732 for (i = 0; i < len; i++) { |
| 4733 identifier value; | 4733 identifier value; |
| 4734 res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &value, arena); | 4734 res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4735 if (res != 0) goto failed; | 4735 if (res != 0) goto failed; |
| 4760 if (!PyList_Check(tmp)) { | 4760 if (!PyList_Check(tmp)) { |
| 4761 PyErr_Format(PyExc_TypeError, "Nonlocal field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4761 PyErr_Format(PyExc_TypeError, "Nonlocal field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4762 goto failed; | 4762 goto failed; |
| 4763 } | 4763 } |
| 4764 len = PyList_GET_SIZE(tmp); | 4764 len = PyList_GET_SIZE(tmp); |
| 4765 names = asdl_seq_new(len, arena); | 4765 names = _Py_asdl_seq_new(len, arena); |
| 4766 if (names == NULL) goto failed; | 4766 if (names == NULL) goto failed; |
| 4767 for (i = 0; i < len; i++) { | 4767 for (i = 0; i < len; i++) { |
| 4768 identifier value; | 4768 identifier value; |
| 4769 res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &value, arena); | 4769 res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4770 if (res != 0) goto failed; | 4770 if (res != 0) goto failed; |
| 4901 if (!PyList_Check(tmp)) { | 4901 if (!PyList_Check(tmp)) { |
| 4902 PyErr_Format(PyExc_TypeError, "BoolOp field \"values\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 4902 PyErr_Format(PyExc_TypeError, "BoolOp field \"values\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 4903 goto failed; | 4903 goto failed; |
| 4904 } | 4904 } |
| 4905 len = PyList_GET_SIZE(tmp); | 4905 len = PyList_GET_SIZE(tmp); |
| 4906 values = asdl_seq_new(len, arena); | 4906 values = _Py_asdl_seq_new(len, arena); |
| 4907 if (values == NULL) goto failed; | 4907 if (values == NULL) goto failed; |
| 4908 for (i = 0; i < len; i++) { | 4908 for (i = 0; i < len; i++) { |
| 4909 expr_ty value; | 4909 expr_ty value; |
| 4910 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 4910 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 4911 if (res != 0) goto failed; | 4911 if (res != 0) goto failed; |
| 5097 if (!PyList_Check(tmp)) { | 5097 if (!PyList_Check(tmp)) { |
| 5098 PyErr_Format(PyExc_TypeError, "Dict field \"keys\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5098 PyErr_Format(PyExc_TypeError, "Dict field \"keys\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5099 goto failed; | 5099 goto failed; |
| 5100 } | 5100 } |
| 5101 len = PyList_GET_SIZE(tmp); | 5101 len = PyList_GET_SIZE(tmp); |
| 5102 keys = asdl_seq_new(len, arena); | 5102 keys = _Py_asdl_seq_new(len, arena); |
| 5103 if (keys == NULL) goto failed; | 5103 if (keys == NULL) goto failed; |
| 5104 for (i = 0; i < len; i++) { | 5104 for (i = 0; i < len; i++) { |
| 5105 expr_ty value; | 5105 expr_ty value; |
| 5106 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 5106 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5107 if (res != 0) goto failed; | 5107 if (res != 0) goto failed; |
| 5121 if (!PyList_Check(tmp)) { | 5121 if (!PyList_Check(tmp)) { |
| 5122 PyErr_Format(PyExc_TypeError, "Dict field \"values\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5122 PyErr_Format(PyExc_TypeError, "Dict field \"values\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5123 goto failed; | 5123 goto failed; |
| 5124 } | 5124 } |
| 5125 len = PyList_GET_SIZE(tmp); | 5125 len = PyList_GET_SIZE(tmp); |
| 5126 values = asdl_seq_new(len, arena); | 5126 values = _Py_asdl_seq_new(len, arena); |
| 5127 if (values == NULL) goto failed; | 5127 if (values == NULL) goto failed; |
| 5128 for (i = 0; i < len; i++) { | 5128 for (i = 0; i < len; i++) { |
| 5129 expr_ty value; | 5129 expr_ty value; |
| 5130 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 5130 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5131 if (res != 0) goto failed; | 5131 if (res != 0) goto failed; |
| 5156 if (!PyList_Check(tmp)) { | 5156 if (!PyList_Check(tmp)) { |
| 5157 PyErr_Format(PyExc_TypeError, "Set field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5157 PyErr_Format(PyExc_TypeError, "Set field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5158 goto failed; | 5158 goto failed; |
| 5159 } | 5159 } |
| 5160 len = PyList_GET_SIZE(tmp); | 5160 len = PyList_GET_SIZE(tmp); |
| 5161 elts = asdl_seq_new(len, arena); | 5161 elts = _Py_asdl_seq_new(len, arena); |
| 5162 if (elts == NULL) goto failed; | 5162 if (elts == NULL) goto failed; |
| 5163 for (i = 0; i < len; i++) { | 5163 for (i = 0; i < len; i++) { |
| 5164 expr_ty value; | 5164 expr_ty value; |
| 5165 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 5165 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5166 if (res != 0) goto failed; | 5166 if (res != 0) goto failed; |
| 5203 if (!PyList_Check(tmp)) { | 5203 if (!PyList_Check(tmp)) { |
| 5204 PyErr_Format(PyExc_TypeError, "ListComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5204 PyErr_Format(PyExc_TypeError, "ListComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5205 goto failed; | 5205 goto failed; |
| 5206 } | 5206 } |
| 5207 len = PyList_GET_SIZE(tmp); | 5207 len = PyList_GET_SIZE(tmp); |
| 5208 generators = asdl_seq_new(len, arena); | 5208 generators = _Py_asdl_seq_new(len, arena); |
| 5209 if (generators == NULL) goto failed; | 5209 if (generators == NULL) goto failed; |
| 5210 for (i = 0; i < len; i++) { | 5210 for (i = 0; i < len; i++) { |
| 5211 comprehension_ty value; | 5211 comprehension_ty value; |
| 5212 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); | 5212 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5213 if (res != 0) goto failed; | 5213 if (res != 0) goto failed; |
| 5250 if (!PyList_Check(tmp)) { | 5250 if (!PyList_Check(tmp)) { |
| 5251 PyErr_Format(PyExc_TypeError, "SetComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5251 PyErr_Format(PyExc_TypeError, "SetComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5252 goto failed; | 5252 goto failed; |
| 5253 } | 5253 } |
| 5254 len = PyList_GET_SIZE(tmp); | 5254 len = PyList_GET_SIZE(tmp); |
| 5255 generators = asdl_seq_new(len, arena); | 5255 generators = _Py_asdl_seq_new(len, arena); |
| 5256 if (generators == NULL) goto failed; | 5256 if (generators == NULL) goto failed; |
| 5257 for (i = 0; i < len; i++) { | 5257 for (i = 0; i < len; i++) { |
| 5258 comprehension_ty value; | 5258 comprehension_ty value; |
| 5259 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); | 5259 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5260 if (res != 0) goto failed; | 5260 if (res != 0) goto failed; |
| 5309 if (!PyList_Check(tmp)) { | 5309 if (!PyList_Check(tmp)) { |
| 5310 PyErr_Format(PyExc_TypeError, "DictComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5310 PyErr_Format(PyExc_TypeError, "DictComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5311 goto failed; | 5311 goto failed; |
| 5312 } | 5312 } |
| 5313 len = PyList_GET_SIZE(tmp); | 5313 len = PyList_GET_SIZE(tmp); |
| 5314 generators = asdl_seq_new(len, arena); | 5314 generators = _Py_asdl_seq_new(len, arena); |
| 5315 if (generators == NULL) goto failed; | 5315 if (generators == NULL) goto failed; |
| 5316 for (i = 0; i < len; i++) { | 5316 for (i = 0; i < len; i++) { |
| 5317 comprehension_ty value; | 5317 comprehension_ty value; |
| 5318 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); | 5318 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5319 if (res != 0) goto failed; | 5319 if (res != 0) goto failed; |
| 5356 if (!PyList_Check(tmp)) { | 5356 if (!PyList_Check(tmp)) { |
| 5357 PyErr_Format(PyExc_TypeError, "GeneratorExp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5357 PyErr_Format(PyExc_TypeError, "GeneratorExp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5358 goto failed; | 5358 goto failed; |
| 5359 } | 5359 } |
| 5360 len = PyList_GET_SIZE(tmp); | 5360 len = PyList_GET_SIZE(tmp); |
| 5361 generators = asdl_seq_new(len, arena); | 5361 generators = _Py_asdl_seq_new(len, arena); |
| 5362 if (generators == NULL) goto failed; | 5362 if (generators == NULL) goto failed; |
| 5363 for (i = 0; i < len; i++) { | 5363 for (i = 0; i < len; i++) { |
| 5364 comprehension_ty value; | 5364 comprehension_ty value; |
| 5365 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); | 5365 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5366 if (res != 0) goto failed; | 5366 if (res != 0) goto failed; |
| 5447 if (!PyList_Check(tmp)) { | 5447 if (!PyList_Check(tmp)) { |
| 5448 PyErr_Format(PyExc_TypeError, "Compare field \"ops\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5448 PyErr_Format(PyExc_TypeError, "Compare field \"ops\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5449 goto failed; | 5449 goto failed; |
| 5450 } | 5450 } |
| 5451 len = PyList_GET_SIZE(tmp); | 5451 len = PyList_GET_SIZE(tmp); |
| 5452 ops = asdl_int_seq_new(len, arena); | 5452 ops = _Py_asdl_int_seq_new(len, arena); |
| 5453 if (ops == NULL) goto failed; | 5453 if (ops == NULL) goto failed; |
| 5454 for (i = 0; i < len; i++) { | 5454 for (i = 0; i < len; i++) { |
| 5455 cmpop_ty value; | 5455 cmpop_ty value; |
| 5456 res = obj2ast_cmpop(PyList_GET_ITEM(tmp, i), &value, arena); | 5456 res = obj2ast_cmpop(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5457 if (res != 0) goto failed; | 5457 if (res != 0) goto failed; |
| 5471 if (!PyList_Check(tmp)) { | 5471 if (!PyList_Check(tmp)) { |
| 5472 PyErr_Format(PyExc_TypeError, "Compare field \"comparators\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5472 PyErr_Format(PyExc_TypeError, "Compare field \"comparators\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5473 goto failed; | 5473 goto failed; |
| 5474 } | 5474 } |
| 5475 len = PyList_GET_SIZE(tmp); | 5475 len = PyList_GET_SIZE(tmp); |
| 5476 comparators = asdl_seq_new(len, arena); | 5476 comparators = _Py_asdl_seq_new(len, arena); |
| 5477 if (comparators == NULL) goto failed; | 5477 if (comparators == NULL) goto failed; |
| 5478 for (i = 0; i < len; i++) { | 5478 for (i = 0; i < len; i++) { |
| 5479 expr_ty value; | 5479 expr_ty value; |
| 5480 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 5480 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5481 if (res != 0) goto failed; | 5481 if (res != 0) goto failed; |
| 5521 if (!PyList_Check(tmp)) { | 5521 if (!PyList_Check(tmp)) { |
| 5522 PyErr_Format(PyExc_TypeError, "Call field \"args\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5522 PyErr_Format(PyExc_TypeError, "Call field \"args\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5523 goto failed; | 5523 goto failed; |
| 5524 } | 5524 } |
| 5525 len = PyList_GET_SIZE(tmp); | 5525 len = PyList_GET_SIZE(tmp); |
| 5526 args = asdl_seq_new(len, arena); | 5526 args = _Py_asdl_seq_new(len, arena); |
| 5527 if (args == NULL) goto failed; | 5527 if (args == NULL) goto failed; |
| 5528 for (i = 0; i < len; i++) { | 5528 for (i = 0; i < len; i++) { |
| 5529 expr_ty value; | 5529 expr_ty value; |
| 5530 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 5530 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5531 if (res != 0) goto failed; | 5531 if (res != 0) goto failed; |
| 5545 if (!PyList_Check(tmp)) { | 5545 if (!PyList_Check(tmp)) { |
| 5546 PyErr_Format(PyExc_TypeError, "Call field \"keywords\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5546 PyErr_Format(PyExc_TypeError, "Call field \"keywords\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5547 goto failed; | 5547 goto failed; |
| 5548 } | 5548 } |
| 5549 len = PyList_GET_SIZE(tmp); | 5549 len = PyList_GET_SIZE(tmp); |
| 5550 keywords = asdl_seq_new(len, arena); | 5550 keywords = _Py_asdl_seq_new(len, arena); |
| 5551 if (keywords == NULL) goto failed; | 5551 if (keywords == NULL) goto failed; |
| 5552 for (i = 0; i < len; i++) { | 5552 for (i = 0; i < len; i++) { |
| 5553 keyword_ty value; | 5553 keyword_ty value; |
| 5554 res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &value, arena); | 5554 res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5555 if (res != 0) goto failed; | 5555 if (res != 0) goto failed; |
| 5860 if (!PyList_Check(tmp)) { | 5860 if (!PyList_Check(tmp)) { |
| 5861 PyErr_Format(PyExc_TypeError, "List field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5861 PyErr_Format(PyExc_TypeError, "List field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5862 goto failed; | 5862 goto failed; |
| 5863 } | 5863 } |
| 5864 len = PyList_GET_SIZE(tmp); | 5864 len = PyList_GET_SIZE(tmp); |
| 5865 elts = asdl_seq_new(len, arena); | 5865 elts = _Py_asdl_seq_new(len, arena); |
| 5866 if (elts == NULL) goto failed; | 5866 if (elts == NULL) goto failed; |
| 5867 for (i = 0; i < len; i++) { | 5867 for (i = 0; i < len; i++) { |
| 5868 expr_ty value; | 5868 expr_ty value; |
| 5869 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 5869 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5870 if (res != 0) goto failed; | 5870 if (res != 0) goto failed; |
| 5907 if (!PyList_Check(tmp)) { | 5907 if (!PyList_Check(tmp)) { |
| 5908 PyErr_Format(PyExc_TypeError, "Tuple field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 5908 PyErr_Format(PyExc_TypeError, "Tuple field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 5909 goto failed; | 5909 goto failed; |
| 5910 } | 5910 } |
| 5911 len = PyList_GET_SIZE(tmp); | 5911 len = PyList_GET_SIZE(tmp); |
| 5912 elts = asdl_seq_new(len, arena); | 5912 elts = _Py_asdl_seq_new(len, arena); |
| 5913 if (elts == NULL) goto failed; | 5913 if (elts == NULL) goto failed; |
| 5914 for (i = 0; i < len; i++) { | 5914 for (i = 0; i < len; i++) { |
| 5915 expr_ty value; | 5915 expr_ty value; |
| 5916 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 5916 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 5917 if (res != 0) goto failed; | 5917 if (res != 0) goto failed; |
| 6072 if (!PyList_Check(tmp)) { | 6072 if (!PyList_Check(tmp)) { |
| 6073 PyErr_Format(PyExc_TypeError, "ExtSlice field \"dims\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 6073 PyErr_Format(PyExc_TypeError, "ExtSlice field \"dims\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 6074 goto failed; | 6074 goto failed; |
| 6075 } | 6075 } |
| 6076 len = PyList_GET_SIZE(tmp); | 6076 len = PyList_GET_SIZE(tmp); |
| 6077 dims = asdl_seq_new(len, arena); | 6077 dims = _Py_asdl_seq_new(len, arena); |
| 6078 if (dims == NULL) goto failed; | 6078 if (dims == NULL) goto failed; |
| 6079 for (i = 0; i < len; i++) { | 6079 for (i = 0; i < len; i++) { |
| 6080 slice_ty value; | 6080 slice_ty value; |
| 6081 res = obj2ast_slice(PyList_GET_ITEM(tmp, i), &value, arena); | 6081 res = obj2ast_slice(PyList_GET_ITEM(tmp, i), &value, arena); |
| 6082 if (res != 0) goto failed; | 6082 if (res != 0) goto failed; |
| 6423 if (!PyList_Check(tmp)) { | 6423 if (!PyList_Check(tmp)) { |
| 6424 PyErr_Format(PyExc_TypeError, "comprehension field \"ifs\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 6424 PyErr_Format(PyExc_TypeError, "comprehension field \"ifs\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 6425 goto failed; | 6425 goto failed; |
| 6426 } | 6426 } |
| 6427 len = PyList_GET_SIZE(tmp); | 6427 len = PyList_GET_SIZE(tmp); |
| 6428 ifs = asdl_seq_new(len, arena); | 6428 ifs = _Py_asdl_seq_new(len, arena); |
| 6429 if (ifs == NULL) goto failed; | 6429 if (ifs == NULL) goto failed; |
| 6430 for (i = 0; i < len; i++) { | 6430 for (i = 0; i < len; i++) { |
| 6431 expr_ty value; | 6431 expr_ty value; |
| 6432 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 6432 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 6433 if (res != 0) goto failed; | 6433 if (res != 0) goto failed; |
| 6518 if (!PyList_Check(tmp)) { | 6518 if (!PyList_Check(tmp)) { |
| 6519 PyErr_Format(PyExc_TypeError, "ExceptHandler field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 6519 PyErr_Format(PyExc_TypeError, "ExceptHandler field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 6520 goto failed; | 6520 goto failed; |
| 6521 } | 6521 } |
| 6522 len = PyList_GET_SIZE(tmp); | 6522 len = PyList_GET_SIZE(tmp); |
| 6523 body = asdl_seq_new(len, arena); | 6523 body = _Py_asdl_seq_new(len, arena); |
| 6524 if (body == NULL) goto failed; | 6524 if (body == NULL) goto failed; |
| 6525 for (i = 0; i < len; i++) { | 6525 for (i = 0; i < len; i++) { |
| 6526 stmt_ty value; | 6526 stmt_ty value; |
| 6527 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); | 6527 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &value, arena); |
| 6528 if (res != 0) goto failed; | 6528 if (res != 0) goto failed; |
| 6564 if (!PyList_Check(tmp)) { | 6564 if (!PyList_Check(tmp)) { |
| 6565 PyErr_Format(PyExc_TypeError, "arguments field \"args\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 6565 PyErr_Format(PyExc_TypeError, "arguments field \"args\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 6566 goto failed; | 6566 goto failed; |
| 6567 } | 6567 } |
| 6568 len = PyList_GET_SIZE(tmp); | 6568 len = PyList_GET_SIZE(tmp); |
| 6569 args = asdl_seq_new(len, arena); | 6569 args = _Py_asdl_seq_new(len, arena); |
| 6570 if (args == NULL) goto failed; | 6570 if (args == NULL) goto failed; |
| 6571 for (i = 0; i < len; i++) { | 6571 for (i = 0; i < len; i++) { |
| 6572 arg_ty value; | 6572 arg_ty value; |
| 6573 res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &value, arena); | 6573 res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &value, arena); |
| 6574 if (res != 0) goto failed; | 6574 if (res != 0) goto failed; |
| 6598 if (!PyList_Check(tmp)) { | 6598 if (!PyList_Check(tmp)) { |
| 6599 PyErr_Format(PyExc_TypeError, "arguments field \"kwonlyargs\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 6599 PyErr_Format(PyExc_TypeError, "arguments field \"kwonlyargs\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 6600 goto failed; | 6600 goto failed; |
| 6601 } | 6601 } |
| 6602 len = PyList_GET_SIZE(tmp); | 6602 len = PyList_GET_SIZE(tmp); |
| 6603 kwonlyargs = asdl_seq_new(len, arena); | 6603 kwonlyargs = _Py_asdl_seq_new(len, arena); |
| 6604 if (kwonlyargs == NULL) goto failed; | 6604 if (kwonlyargs == NULL) goto failed; |
| 6605 for (i = 0; i < len; i++) { | 6605 for (i = 0; i < len; i++) { |
| 6606 arg_ty value; | 6606 arg_ty value; |
| 6607 res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &value, arena); | 6607 res = obj2ast_arg(PyList_GET_ITEM(tmp, i), &value, arena); |
| 6608 if (res != 0) goto failed; | 6608 if (res != 0) goto failed; |
| 6622 if (!PyList_Check(tmp)) { | 6622 if (!PyList_Check(tmp)) { |
| 6623 PyErr_Format(PyExc_TypeError, "arguments field \"kw_defaults\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 6623 PyErr_Format(PyExc_TypeError, "arguments field \"kw_defaults\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 6624 goto failed; | 6624 goto failed; |
| 6625 } | 6625 } |
| 6626 len = PyList_GET_SIZE(tmp); | 6626 len = PyList_GET_SIZE(tmp); |
| 6627 kw_defaults = asdl_seq_new(len, arena); | 6627 kw_defaults = _Py_asdl_seq_new(len, arena); |
| 6628 if (kw_defaults == NULL) goto failed; | 6628 if (kw_defaults == NULL) goto failed; |
| 6629 for (i = 0; i < len; i++) { | 6629 for (i = 0; i < len; i++) { |
| 6630 expr_ty value; | 6630 expr_ty value; |
| 6631 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 6631 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 6632 if (res != 0) goto failed; | 6632 if (res != 0) goto failed; |
| 6656 if (!PyList_Check(tmp)) { | 6656 if (!PyList_Check(tmp)) { |
| 6657 PyErr_Format(PyExc_TypeError, "arguments field \"defaults\" must be a list, not a %.200s", tmp->ob_type->tp_name); | 6657 PyErr_Format(PyExc_TypeError, "arguments field \"defaults\" must be a list, not a %.200s", tmp->ob_type->tp_name); |
| 6658 goto failed; | 6658 goto failed; |
| 6659 } | 6659 } |
| 6660 len = PyList_GET_SIZE(tmp); | 6660 len = PyList_GET_SIZE(tmp); |
| 6661 defaults = asdl_seq_new(len, arena); | 6661 defaults = _Py_asdl_seq_new(len, arena); |
| 6662 if (defaults == NULL) goto failed; | 6662 if (defaults == NULL) goto failed; |
| 6663 for (i = 0; i < len; i++) { | 6663 for (i = 0; i < len; i++) { |
| 6664 expr_ty value; | 6664 expr_ty value; |
| 6665 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); | 6665 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &value, arena); |
| 6666 if (res != 0) goto failed; | 6666 if (res != 0) goto failed; |
