Lines Matching full:tmp

3322         PyObject* tmp = NULL;  in obj2ast_mod()  local
3341 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_mod()
3342 if (tmp == NULL) goto failed; in obj2ast_mod()
3343 if (!PyList_Check(tmp)) { in obj2ast_mod()
3344 …rmat(PyExc_TypeError, "Module field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_mod()
3347 len = PyList_GET_SIZE(tmp); in obj2ast_mod()
3352 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_mod()
3354 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_mod()
3360 Py_XDECREF(tmp); in obj2ast_mod()
3361 tmp = NULL; in obj2ast_mod()
3381 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_mod()
3382 if (tmp == NULL) goto failed; in obj2ast_mod()
3383 if (!PyList_Check(tmp)) { in obj2ast_mod()
3384 …PyExc_TypeError, "Interactive field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_mod()
3387 len = PyList_GET_SIZE(tmp); in obj2ast_mod()
3392 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_mod()
3394 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_mod()
3400 Py_XDECREF(tmp); in obj2ast_mod()
3401 tmp = NULL; in obj2ast_mod()
3419 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_mod()
3420 if (tmp == NULL) goto failed; in obj2ast_mod()
3421 res = obj2ast_expr(tmp, &body, arena); in obj2ast_mod()
3423 Py_XDECREF(tmp); in obj2ast_mod()
3424 tmp = NULL; in obj2ast_mod()
3444 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_mod()
3445 if (tmp == NULL) goto failed; in obj2ast_mod()
3446 if (!PyList_Check(tmp)) { in obj2ast_mod()
3447 …ormat(PyExc_TypeError, "Suite field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_mod()
3450 len = PyList_GET_SIZE(tmp); in obj2ast_mod()
3455 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_mod()
3457 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_mod()
3463 Py_XDECREF(tmp); in obj2ast_mod()
3464 tmp = NULL; in obj2ast_mod()
3474 tmp = PyObject_Repr(obj); in obj2ast_mod()
3475 if (tmp == NULL) goto failed; in obj2ast_mod()
3476 …yErr_Format(PyExc_TypeError, "expected some sort of mod, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_mod()
3478 Py_XDECREF(tmp); in obj2ast_mod()
3485 PyObject* tmp = NULL; in obj2ast_stmt() local
3497 tmp = PyObject_GetAttrString(obj, "lineno"); in obj2ast_stmt()
3498 if (tmp == NULL) goto failed; in obj2ast_stmt()
3499 res = obj2ast_int(tmp, &lineno, arena); in obj2ast_stmt()
3501 Py_XDECREF(tmp); in obj2ast_stmt()
3502 tmp = NULL; in obj2ast_stmt()
3509 tmp = PyObject_GetAttrString(obj, "col_offset"); in obj2ast_stmt()
3510 if (tmp == NULL) goto failed; in obj2ast_stmt()
3511 res = obj2ast_int(tmp, &col_offset, arena); in obj2ast_stmt()
3513 Py_XDECREF(tmp); in obj2ast_stmt()
3514 tmp = NULL; in obj2ast_stmt()
3531 tmp = PyObject_GetAttrString(obj, "name"); in obj2ast_stmt()
3532 if (tmp == NULL) goto failed; in obj2ast_stmt()
3533 res = obj2ast_identifier(tmp, &name, arena); in obj2ast_stmt()
3535 Py_XDECREF(tmp); in obj2ast_stmt()
3536 tmp = NULL; in obj2ast_stmt()
3543 tmp = PyObject_GetAttrString(obj, "args"); in obj2ast_stmt()
3544 if (tmp == NULL) goto failed; in obj2ast_stmt()
3545 res = obj2ast_arguments(tmp, &args, arena); in obj2ast_stmt()
3547 Py_XDECREF(tmp); in obj2ast_stmt()
3548 tmp = NULL; in obj2ast_stmt()
3557 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
3558 if (tmp == NULL) goto failed; in obj2ast_stmt()
3559 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3560 …PyExc_TypeError, "FunctionDef field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3563 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3568 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3570 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3576 Py_XDECREF(tmp); in obj2ast_stmt()
3577 tmp = NULL; in obj2ast_stmt()
3586 tmp = PyObject_GetAttrString(obj, "decorator_list"); in obj2ast_stmt()
3587 if (tmp == NULL) goto failed; in obj2ast_stmt()
3588 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3589 …Error, "FunctionDef field \"decorator_list\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3592 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3597 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3599 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3605 Py_XDECREF(tmp); in obj2ast_stmt()
3606 tmp = NULL; in obj2ast_stmt()
3628 tmp = PyObject_GetAttrString(obj, "name"); in obj2ast_stmt()
3629 if (tmp == NULL) goto failed; in obj2ast_stmt()
3630 res = obj2ast_identifier(tmp, &name, arena); in obj2ast_stmt()
3632 Py_XDECREF(tmp); in obj2ast_stmt()
3633 tmp = NULL; in obj2ast_stmt()
3642 tmp = PyObject_GetAttrString(obj, "bases"); in obj2ast_stmt()
3643 if (tmp == NULL) goto failed; in obj2ast_stmt()
3644 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3645 …t(PyExc_TypeError, "ClassDef field \"bases\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3648 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3653 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3655 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3661 Py_XDECREF(tmp); in obj2ast_stmt()
3662 tmp = NULL; in obj2ast_stmt()
3671 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
3672 if (tmp == NULL) goto failed; in obj2ast_stmt()
3673 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3674 …at(PyExc_TypeError, "ClassDef field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3677 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3682 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3684 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3690 Py_XDECREF(tmp); in obj2ast_stmt()
3691 tmp = NULL; in obj2ast_stmt()
3700 tmp = PyObject_GetAttrString(obj, "decorator_list"); in obj2ast_stmt()
3701 if (tmp == NULL) goto failed; in obj2ast_stmt()
3702 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3703 …ypeError, "ClassDef field \"decorator_list\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3706 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3711 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3713 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3719 Py_XDECREF(tmp); in obj2ast_stmt()
3720 tmp = NULL; in obj2ast_stmt()
3739 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_stmt()
3740 if (tmp == NULL) goto failed; in obj2ast_stmt()
3741 res = obj2ast_expr(tmp, &value, arena); in obj2ast_stmt()
3743 Py_XDECREF(tmp); in obj2ast_stmt()
3744 tmp = NULL; in obj2ast_stmt()
3763 tmp = PyObject_GetAttrString(obj, "targets"); in obj2ast_stmt()
3764 if (tmp == NULL) goto failed; in obj2ast_stmt()
3765 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3766 …t(PyExc_TypeError, "Delete field \"targets\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3769 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3774 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3776 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3782 Py_XDECREF(tmp); in obj2ast_stmt()
3783 tmp = NULL; in obj2ast_stmt()
3804 tmp = PyObject_GetAttrString(obj, "targets"); in obj2ast_stmt()
3805 if (tmp == NULL) goto failed; in obj2ast_stmt()
3806 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3807 …t(PyExc_TypeError, "Assign field \"targets\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3810 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3815 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3817 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3823 Py_XDECREF(tmp); in obj2ast_stmt()
3824 tmp = NULL; in obj2ast_stmt()
3831 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_stmt()
3832 if (tmp == NULL) goto failed; in obj2ast_stmt()
3833 res = obj2ast_expr(tmp, &value, arena); in obj2ast_stmt()
3835 Py_XDECREF(tmp); in obj2ast_stmt()
3836 tmp = NULL; in obj2ast_stmt()
3856 tmp = PyObject_GetAttrString(obj, "target"); in obj2ast_stmt()
3857 if (tmp == NULL) goto failed; in obj2ast_stmt()
3858 res = obj2ast_expr(tmp, &target, arena); in obj2ast_stmt()
3860 Py_XDECREF(tmp); in obj2ast_stmt()
3861 tmp = NULL; in obj2ast_stmt()
3868 tmp = PyObject_GetAttrString(obj, "op"); in obj2ast_stmt()
3869 if (tmp == NULL) goto failed; in obj2ast_stmt()
3870 res = obj2ast_operator(tmp, &op, arena); in obj2ast_stmt()
3872 Py_XDECREF(tmp); in obj2ast_stmt()
3873 tmp = NULL; in obj2ast_stmt()
3880 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_stmt()
3881 if (tmp == NULL) goto failed; in obj2ast_stmt()
3882 res = obj2ast_expr(tmp, &value, arena); in obj2ast_stmt()
3884 Py_XDECREF(tmp); in obj2ast_stmt()
3885 tmp = NULL; in obj2ast_stmt()
3905 tmp = PyObject_GetAttrString(obj, "dest"); in obj2ast_stmt()
3906 if (tmp == NULL) goto failed; in obj2ast_stmt()
3907 res = obj2ast_expr(tmp, &dest, arena); in obj2ast_stmt()
3909 Py_XDECREF(tmp); in obj2ast_stmt()
3910 tmp = NULL; in obj2ast_stmt()
3918 tmp = PyObject_GetAttrString(obj, "values"); in obj2ast_stmt()
3919 if (tmp == NULL) goto failed; in obj2ast_stmt()
3920 if (!PyList_Check(tmp)) { in obj2ast_stmt()
3921 …mat(PyExc_TypeError, "Print field \"values\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
3924 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
3929 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
3931 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
3937 Py_XDECREF(tmp); in obj2ast_stmt()
3938 tmp = NULL; in obj2ast_stmt()
3945 tmp = PyObject_GetAttrString(obj, "nl"); in obj2ast_stmt()
3946 if (tmp == NULL) goto failed; in obj2ast_stmt()
3947 res = obj2ast_bool(tmp, &nl, arena); in obj2ast_stmt()
3949 Py_XDECREF(tmp); in obj2ast_stmt()
3950 tmp = NULL; in obj2ast_stmt()
3971 tmp = PyObject_GetAttrString(obj, "target"); in obj2ast_stmt()
3972 if (tmp == NULL) goto failed; in obj2ast_stmt()
3973 res = obj2ast_expr(tmp, &target, arena); in obj2ast_stmt()
3975 Py_XDECREF(tmp); in obj2ast_stmt()
3976 tmp = NULL; in obj2ast_stmt()
3983 tmp = PyObject_GetAttrString(obj, "iter"); in obj2ast_stmt()
3984 if (tmp == NULL) goto failed; in obj2ast_stmt()
3985 res = obj2ast_expr(tmp, &iter, arena); in obj2ast_stmt()
3987 Py_XDECREF(tmp); in obj2ast_stmt()
3988 tmp = NULL; in obj2ast_stmt()
3997 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
3998 if (tmp == NULL) goto failed; in obj2ast_stmt()
3999 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4000 …_Format(PyExc_TypeError, "For field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4003 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4008 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4010 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4016 Py_XDECREF(tmp); in obj2ast_stmt()
4017 tmp = NULL; in obj2ast_stmt()
4026 tmp = PyObject_GetAttrString(obj, "orelse"); in obj2ast_stmt()
4027 if (tmp == NULL) goto failed; in obj2ast_stmt()
4028 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4029 …ormat(PyExc_TypeError, "For field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4032 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4037 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4039 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4045 Py_XDECREF(tmp); in obj2ast_stmt()
4046 tmp = NULL; in obj2ast_stmt()
4067 tmp = PyObject_GetAttrString(obj, "test"); in obj2ast_stmt()
4068 if (tmp == NULL) goto failed; in obj2ast_stmt()
4069 res = obj2ast_expr(tmp, &test, arena); in obj2ast_stmt()
4071 Py_XDECREF(tmp); in obj2ast_stmt()
4072 tmp = NULL; in obj2ast_stmt()
4081 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
4082 if (tmp == NULL) goto failed; in obj2ast_stmt()
4083 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4084 …ormat(PyExc_TypeError, "While field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4087 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4092 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4094 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4100 Py_XDECREF(tmp); in obj2ast_stmt()
4101 tmp = NULL; in obj2ast_stmt()
4110 tmp = PyObject_GetAttrString(obj, "orelse"); in obj2ast_stmt()
4111 if (tmp == NULL) goto failed; in obj2ast_stmt()
4112 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4113 …mat(PyExc_TypeError, "While field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4116 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4121 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4123 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4129 Py_XDECREF(tmp); in obj2ast_stmt()
4130 tmp = NULL; in obj2ast_stmt()
4150 tmp = PyObject_GetAttrString(obj, "test"); in obj2ast_stmt()
4151 if (tmp == NULL) goto failed; in obj2ast_stmt()
4152 res = obj2ast_expr(tmp, &test, arena); in obj2ast_stmt()
4154 Py_XDECREF(tmp); in obj2ast_stmt()
4155 tmp = NULL; in obj2ast_stmt()
4164 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
4165 if (tmp == NULL) goto failed; in obj2ast_stmt()
4166 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4167 …r_Format(PyExc_TypeError, "If field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4170 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4175 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4177 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4183 Py_XDECREF(tmp); in obj2ast_stmt()
4184 tmp = NULL; in obj2ast_stmt()
4193 tmp = PyObject_GetAttrString(obj, "orelse"); in obj2ast_stmt()
4194 if (tmp == NULL) goto failed; in obj2ast_stmt()
4195 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4196 …Format(PyExc_TypeError, "If field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4199 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4204 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4206 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4212 Py_XDECREF(tmp); in obj2ast_stmt()
4213 tmp = NULL; in obj2ast_stmt()
4233 tmp = PyObject_GetAttrString(obj, "context_expr"); in obj2ast_stmt()
4234 if (tmp == NULL) goto failed; in obj2ast_stmt()
4235 res = obj2ast_expr(tmp, &context_expr, arena); in obj2ast_stmt()
4237 Py_XDECREF(tmp); in obj2ast_stmt()
4238 tmp = NULL; in obj2ast_stmt()
4245 tmp = PyObject_GetAttrString(obj, "optional_vars"); in obj2ast_stmt()
4246 if (tmp == NULL) goto failed; in obj2ast_stmt()
4247 res = obj2ast_expr(tmp, &optional_vars, arena); in obj2ast_stmt()
4249 Py_XDECREF(tmp); in obj2ast_stmt()
4250 tmp = NULL; in obj2ast_stmt()
4258 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
4259 if (tmp == NULL) goto failed; in obj2ast_stmt()
4260 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4261 …Format(PyExc_TypeError, "With field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4264 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4269 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4271 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4277 Py_XDECREF(tmp); in obj2ast_stmt()
4278 tmp = NULL; in obj2ast_stmt()
4299 tmp = PyObject_GetAttrString(obj, "type"); in obj2ast_stmt()
4300 if (tmp == NULL) goto failed; in obj2ast_stmt()
4301 res = obj2ast_expr(tmp, &type, arena); in obj2ast_stmt()
4303 Py_XDECREF(tmp); in obj2ast_stmt()
4304 tmp = NULL; in obj2ast_stmt()
4310 tmp = PyObject_GetAttrString(obj, "inst"); in obj2ast_stmt()
4311 if (tmp == NULL) goto failed; in obj2ast_stmt()
4312 res = obj2ast_expr(tmp, &inst, arena); in obj2ast_stmt()
4314 Py_XDECREF(tmp); in obj2ast_stmt()
4315 tmp = NULL; in obj2ast_stmt()
4321 tmp = PyObject_GetAttrString(obj, "tback"); in obj2ast_stmt()
4322 if (tmp == NULL) goto failed; in obj2ast_stmt()
4323 res = obj2ast_expr(tmp, &tback, arena); in obj2ast_stmt()
4325 Py_XDECREF(tmp); in obj2ast_stmt()
4326 tmp = NULL; in obj2ast_stmt()
4347 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
4348 if (tmp == NULL) goto failed; in obj2ast_stmt()
4349 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4350 …t(PyExc_TypeError, "TryExcept field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4353 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4358 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4360 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4366 Py_XDECREF(tmp); in obj2ast_stmt()
4367 tmp = NULL; in obj2ast_stmt()
4376 tmp = PyObject_GetAttrString(obj, "handlers"); in obj2ast_stmt()
4377 if (tmp == NULL) goto failed; in obj2ast_stmt()
4378 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4379 …Exc_TypeError, "TryExcept field \"handlers\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4382 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4387 res = obj2ast_excepthandler(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4389 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4395 Py_XDECREF(tmp); in obj2ast_stmt()
4396 tmp = NULL; in obj2ast_stmt()
4405 tmp = PyObject_GetAttrString(obj, "orelse"); in obj2ast_stmt()
4406 if (tmp == NULL) goto failed; in obj2ast_stmt()
4407 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4408 …PyExc_TypeError, "TryExcept field \"orelse\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4411 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4416 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4418 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4424 Py_XDECREF(tmp); in obj2ast_stmt()
4425 tmp = NULL; in obj2ast_stmt()
4447 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
4448 if (tmp == NULL) goto failed; in obj2ast_stmt()
4449 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4450 …(PyExc_TypeError, "TryFinally field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4453 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4458 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4460 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4466 Py_XDECREF(tmp); in obj2ast_stmt()
4467 tmp = NULL; in obj2ast_stmt()
4476 tmp = PyObject_GetAttrString(obj, "finalbody"); in obj2ast_stmt()
4477 if (tmp == NULL) goto failed; in obj2ast_stmt()
4478 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4479 …c_TypeError, "TryFinally field \"finalbody\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4482 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4487 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4489 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4495 Py_XDECREF(tmp); in obj2ast_stmt()
4496 tmp = NULL; in obj2ast_stmt()
4515 tmp = PyObject_GetAttrString(obj, "test"); in obj2ast_stmt()
4516 if (tmp == NULL) goto failed; in obj2ast_stmt()
4517 res = obj2ast_expr(tmp, &test, arena); in obj2ast_stmt()
4519 Py_XDECREF(tmp); in obj2ast_stmt()
4520 tmp = NULL; in obj2ast_stmt()
4527 tmp = PyObject_GetAttrString(obj, "msg"); in obj2ast_stmt()
4528 if (tmp == NULL) goto failed; in obj2ast_stmt()
4529 res = obj2ast_expr(tmp, &msg, arena); in obj2ast_stmt()
4531 Py_XDECREF(tmp); in obj2ast_stmt()
4532 tmp = NULL; in obj2ast_stmt()
4551 tmp = PyObject_GetAttrString(obj, "names"); in obj2ast_stmt()
4552 if (tmp == NULL) goto failed; in obj2ast_stmt()
4553 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4554 …mat(PyExc_TypeError, "Import field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4557 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4562 res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4564 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4570 Py_XDECREF(tmp); in obj2ast_stmt()
4571 tmp = NULL; in obj2ast_stmt()
4591 tmp = PyObject_GetAttrString(obj, "module"); in obj2ast_stmt()
4592 if (tmp == NULL) goto failed; in obj2ast_stmt()
4593 res = obj2ast_identifier(tmp, &module, arena); in obj2ast_stmt()
4595 Py_XDECREF(tmp); in obj2ast_stmt()
4596 tmp = NULL; in obj2ast_stmt()
4604 tmp = PyObject_GetAttrString(obj, "names"); in obj2ast_stmt()
4605 if (tmp == NULL) goto failed; in obj2ast_stmt()
4606 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4607 …PyExc_TypeError, "ImportFrom field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4610 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4615 res = obj2ast_alias(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4617 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4623 Py_XDECREF(tmp); in obj2ast_stmt()
4624 tmp = NULL; in obj2ast_stmt()
4631 tmp = PyObject_GetAttrString(obj, "level"); in obj2ast_stmt()
4632 if (tmp == NULL) goto failed; in obj2ast_stmt()
4633 res = obj2ast_int(tmp, &level, arena); in obj2ast_stmt()
4635 Py_XDECREF(tmp); in obj2ast_stmt()
4636 tmp = NULL; in obj2ast_stmt()
4656 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_stmt()
4657 if (tmp == NULL) goto failed; in obj2ast_stmt()
4658 res = obj2ast_expr(tmp, &body, arena); in obj2ast_stmt()
4660 Py_XDECREF(tmp); in obj2ast_stmt()
4661 tmp = NULL; in obj2ast_stmt()
4668 tmp = PyObject_GetAttrString(obj, "globals"); in obj2ast_stmt()
4669 if (tmp == NULL) goto failed; in obj2ast_stmt()
4670 res = obj2ast_expr(tmp, &globals, arena); in obj2ast_stmt()
4672 Py_XDECREF(tmp); in obj2ast_stmt()
4673 tmp = NULL; in obj2ast_stmt()
4679 tmp = PyObject_GetAttrString(obj, "locals"); in obj2ast_stmt()
4680 if (tmp == NULL) goto failed; in obj2ast_stmt()
4681 res = obj2ast_expr(tmp, &locals, arena); in obj2ast_stmt()
4683 Py_XDECREF(tmp); in obj2ast_stmt()
4684 tmp = NULL; in obj2ast_stmt()
4703 tmp = PyObject_GetAttrString(obj, "names"); in obj2ast_stmt()
4704 if (tmp == NULL) goto failed; in obj2ast_stmt()
4705 if (!PyList_Check(tmp)) { in obj2ast_stmt()
4706 …mat(PyExc_TypeError, "Global field \"names\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_stmt()
4709 len = PyList_GET_SIZE(tmp); in obj2ast_stmt()
4714 res = obj2ast_identifier(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_stmt()
4716 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_stmt()
4722 Py_XDECREF(tmp); in obj2ast_stmt()
4723 tmp = NULL; in obj2ast_stmt()
4741 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_stmt()
4742 if (tmp == NULL) goto failed; in obj2ast_stmt()
4743 res = obj2ast_expr(tmp, &value, arena); in obj2ast_stmt()
4745 Py_XDECREF(tmp); in obj2ast_stmt()
4746 tmp = NULL; in obj2ast_stmt()
4786 tmp = PyObject_Repr(obj); in obj2ast_stmt()
4787 if (tmp == NULL) goto failed; in obj2ast_stmt()
4788 …Err_Format(PyExc_TypeError, "expected some sort of stmt, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_stmt()
4790 Py_XDECREF(tmp); in obj2ast_stmt()
4797 PyObject* tmp = NULL; in obj2ast_expr() local
4809 tmp = PyObject_GetAttrString(obj, "lineno"); in obj2ast_expr()
4810 if (tmp == NULL) goto failed; in obj2ast_expr()
4811 res = obj2ast_int(tmp, &lineno, arena); in obj2ast_expr()
4813 Py_XDECREF(tmp); in obj2ast_expr()
4814 tmp = NULL; in obj2ast_expr()
4821 tmp = PyObject_GetAttrString(obj, "col_offset"); in obj2ast_expr()
4822 if (tmp == NULL) goto failed; in obj2ast_expr()
4823 res = obj2ast_int(tmp, &col_offset, arena); in obj2ast_expr()
4825 Py_XDECREF(tmp); in obj2ast_expr()
4826 tmp = NULL; in obj2ast_expr()
4841 tmp = PyObject_GetAttrString(obj, "op"); in obj2ast_expr()
4842 if (tmp == NULL) goto failed; in obj2ast_expr()
4843 res = obj2ast_boolop(tmp, &op, arena); in obj2ast_expr()
4845 Py_XDECREF(tmp); in obj2ast_expr()
4846 tmp = NULL; in obj2ast_expr()
4855 tmp = PyObject_GetAttrString(obj, "values"); in obj2ast_expr()
4856 if (tmp == NULL) goto failed; in obj2ast_expr()
4857 if (!PyList_Check(tmp)) { in obj2ast_expr()
4858 …at(PyExc_TypeError, "BoolOp field \"values\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
4861 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
4866 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
4868 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
4874 Py_XDECREF(tmp); in obj2ast_expr()
4875 tmp = NULL; in obj2ast_expr()
4895 tmp = PyObject_GetAttrString(obj, "left"); in obj2ast_expr()
4896 if (tmp == NULL) goto failed; in obj2ast_expr()
4897 res = obj2ast_expr(tmp, &left, arena); in obj2ast_expr()
4899 Py_XDECREF(tmp); in obj2ast_expr()
4900 tmp = NULL; in obj2ast_expr()
4907 tmp = PyObject_GetAttrString(obj, "op"); in obj2ast_expr()
4908 if (tmp == NULL) goto failed; in obj2ast_expr()
4909 res = obj2ast_operator(tmp, &op, arena); in obj2ast_expr()
4911 Py_XDECREF(tmp); in obj2ast_expr()
4912 tmp = NULL; in obj2ast_expr()
4919 tmp = PyObject_GetAttrString(obj, "right"); in obj2ast_expr()
4920 if (tmp == NULL) goto failed; in obj2ast_expr()
4921 res = obj2ast_expr(tmp, &right, arena); in obj2ast_expr()
4923 Py_XDECREF(tmp); in obj2ast_expr()
4924 tmp = NULL; in obj2ast_expr()
4943 tmp = PyObject_GetAttrString(obj, "op"); in obj2ast_expr()
4944 if (tmp == NULL) goto failed; in obj2ast_expr()
4945 res = obj2ast_unaryop(tmp, &op, arena); in obj2ast_expr()
4947 Py_XDECREF(tmp); in obj2ast_expr()
4948 tmp = NULL; in obj2ast_expr()
4955 tmp = PyObject_GetAttrString(obj, "operand"); in obj2ast_expr()
4956 if (tmp == NULL) goto failed; in obj2ast_expr()
4957 res = obj2ast_expr(tmp, &operand, arena); in obj2ast_expr()
4959 Py_XDECREF(tmp); in obj2ast_expr()
4960 tmp = NULL; in obj2ast_expr()
4979 tmp = PyObject_GetAttrString(obj, "args"); in obj2ast_expr()
4980 if (tmp == NULL) goto failed; in obj2ast_expr()
4981 res = obj2ast_arguments(tmp, &args, arena); in obj2ast_expr()
4983 Py_XDECREF(tmp); in obj2ast_expr()
4984 tmp = NULL; in obj2ast_expr()
4991 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_expr()
4992 if (tmp == NULL) goto failed; in obj2ast_expr()
4993 res = obj2ast_expr(tmp, &body, arena); in obj2ast_expr()
4995 Py_XDECREF(tmp); in obj2ast_expr()
4996 tmp = NULL; in obj2ast_expr()
5016 tmp = PyObject_GetAttrString(obj, "test"); in obj2ast_expr()
5017 if (tmp == NULL) goto failed; in obj2ast_expr()
5018 res = obj2ast_expr(tmp, &test, arena); in obj2ast_expr()
5020 Py_XDECREF(tmp); in obj2ast_expr()
5021 tmp = NULL; in obj2ast_expr()
5028 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_expr()
5029 if (tmp == NULL) goto failed; in obj2ast_expr()
5030 res = obj2ast_expr(tmp, &body, arena); in obj2ast_expr()
5032 Py_XDECREF(tmp); in obj2ast_expr()
5033 tmp = NULL; in obj2ast_expr()
5040 tmp = PyObject_GetAttrString(obj, "orelse"); in obj2ast_expr()
5041 if (tmp == NULL) goto failed; in obj2ast_expr()
5042 res = obj2ast_expr(tmp, &orelse, arena); in obj2ast_expr()
5044 Py_XDECREF(tmp); in obj2ast_expr()
5045 tmp = NULL; in obj2ast_expr()
5066 tmp = PyObject_GetAttrString(obj, "keys"); in obj2ast_expr()
5067 if (tmp == NULL) goto failed; in obj2ast_expr()
5068 if (!PyList_Check(tmp)) { in obj2ast_expr()
5069 …Format(PyExc_TypeError, "Dict field \"keys\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5072 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5077 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5079 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5085 Py_XDECREF(tmp); in obj2ast_expr()
5086 tmp = NULL; in obj2ast_expr()
5095 tmp = PyObject_GetAttrString(obj, "values"); in obj2ast_expr()
5096 if (tmp == NULL) goto failed; in obj2ast_expr()
5097 if (!PyList_Check(tmp)) { in obj2ast_expr()
5098 …rmat(PyExc_TypeError, "Dict field \"values\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5101 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5106 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5108 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5114 Py_XDECREF(tmp); in obj2ast_expr()
5115 tmp = NULL; in obj2ast_expr()
5135 tmp = PyObject_GetAttrString(obj, "elts"); in obj2ast_expr()
5136 if (tmp == NULL) goto failed; in obj2ast_expr()
5137 if (!PyList_Check(tmp)) { in obj2ast_expr()
5138 …_Format(PyExc_TypeError, "Set field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5141 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5146 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5148 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5154 Py_XDECREF(tmp); in obj2ast_expr()
5155 tmp = NULL; in obj2ast_expr()
5174 tmp = PyObject_GetAttrString(obj, "elt"); in obj2ast_expr()
5175 if (tmp == NULL) goto failed; in obj2ast_expr()
5176 res = obj2ast_expr(tmp, &elt, arena); in obj2ast_expr()
5178 Py_XDECREF(tmp); in obj2ast_expr()
5179 tmp = NULL; in obj2ast_expr()
5188 tmp = PyObject_GetAttrString(obj, "generators"); in obj2ast_expr()
5189 if (tmp == NULL) goto failed; in obj2ast_expr()
5190 if (!PyList_Check(tmp)) { in obj2ast_expr()
5191 …xc_TypeError, "ListComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5194 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5199 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5201 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5207 Py_XDECREF(tmp); in obj2ast_expr()
5208 tmp = NULL; in obj2ast_expr()
5227 tmp = PyObject_GetAttrString(obj, "elt"); in obj2ast_expr()
5228 if (tmp == NULL) goto failed; in obj2ast_expr()
5229 res = obj2ast_expr(tmp, &elt, arena); in obj2ast_expr()
5231 Py_XDECREF(tmp); in obj2ast_expr()
5232 tmp = NULL; in obj2ast_expr()
5241 tmp = PyObject_GetAttrString(obj, "generators"); in obj2ast_expr()
5242 if (tmp == NULL) goto failed; in obj2ast_expr()
5243 if (!PyList_Check(tmp)) { in obj2ast_expr()
5244 …Exc_TypeError, "SetComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5247 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5252 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5254 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5260 Py_XDECREF(tmp); in obj2ast_expr()
5261 tmp = NULL; in obj2ast_expr()
5281 tmp = PyObject_GetAttrString(obj, "key"); in obj2ast_expr()
5282 if (tmp == NULL) goto failed; in obj2ast_expr()
5283 res = obj2ast_expr(tmp, &key, arena); in obj2ast_expr()
5285 Py_XDECREF(tmp); in obj2ast_expr()
5286 tmp = NULL; in obj2ast_expr()
5293 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_expr()
5294 if (tmp == NULL) goto failed; in obj2ast_expr()
5295 res = obj2ast_expr(tmp, &value, arena); in obj2ast_expr()
5297 Py_XDECREF(tmp); in obj2ast_expr()
5298 tmp = NULL; in obj2ast_expr()
5307 tmp = PyObject_GetAttrString(obj, "generators"); in obj2ast_expr()
5308 if (tmp == NULL) goto failed; in obj2ast_expr()
5309 if (!PyList_Check(tmp)) { in obj2ast_expr()
5310 …xc_TypeError, "DictComp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5313 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5318 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5320 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5326 Py_XDECREF(tmp); in obj2ast_expr()
5327 tmp = NULL; in obj2ast_expr()
5347 tmp = PyObject_GetAttrString(obj, "elt"); in obj2ast_expr()
5348 if (tmp == NULL) goto failed; in obj2ast_expr()
5349 res = obj2ast_expr(tmp, &elt, arena); in obj2ast_expr()
5351 Py_XDECREF(tmp); in obj2ast_expr()
5352 tmp = NULL; in obj2ast_expr()
5361 tmp = PyObject_GetAttrString(obj, "generators"); in obj2ast_expr()
5362 if (tmp == NULL) goto failed; in obj2ast_expr()
5363 if (!PyList_Check(tmp)) { in obj2ast_expr()
5364 …ypeError, "GeneratorExp field \"generators\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5367 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5372 res = obj2ast_comprehension(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5374 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5380 Py_XDECREF(tmp); in obj2ast_expr()
5381 tmp = NULL; in obj2ast_expr()
5399 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_expr()
5400 if (tmp == NULL) goto failed; in obj2ast_expr()
5401 res = obj2ast_expr(tmp, &value, arena); in obj2ast_expr()
5403 Py_XDECREF(tmp); in obj2ast_expr()
5404 tmp = NULL; in obj2ast_expr()
5423 tmp = PyObject_GetAttrString(obj, "left"); in obj2ast_expr()
5424 if (tmp == NULL) goto failed; in obj2ast_expr()
5425 res = obj2ast_expr(tmp, &left, arena); in obj2ast_expr()
5427 Py_XDECREF(tmp); in obj2ast_expr()
5428 tmp = NULL; in obj2ast_expr()
5437 tmp = PyObject_GetAttrString(obj, "ops"); in obj2ast_expr()
5438 if (tmp == NULL) goto failed; in obj2ast_expr()
5439 if (!PyList_Check(tmp)) { in obj2ast_expr()
5440 …rmat(PyExc_TypeError, "Compare field \"ops\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5443 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5448 res = obj2ast_cmpop(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5450 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5456 Py_XDECREF(tmp); in obj2ast_expr()
5457 tmp = NULL; in obj2ast_expr()
5466 tmp = PyObject_GetAttrString(obj, "comparators"); in obj2ast_expr()
5467 if (tmp == NULL) goto failed; in obj2ast_expr()
5468 if (!PyList_Check(tmp)) { in obj2ast_expr()
5469 …xc_TypeError, "Compare field \"comparators\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5472 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5477 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5479 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5485 Py_XDECREF(tmp); in obj2ast_expr()
5486 tmp = NULL; in obj2ast_expr()
5509 tmp = PyObject_GetAttrString(obj, "func"); in obj2ast_expr()
5510 if (tmp == NULL) goto failed; in obj2ast_expr()
5511 res = obj2ast_expr(tmp, &func, arena); in obj2ast_expr()
5513 Py_XDECREF(tmp); in obj2ast_expr()
5514 tmp = NULL; in obj2ast_expr()
5523 tmp = PyObject_GetAttrString(obj, "args"); in obj2ast_expr()
5524 if (tmp == NULL) goto failed; in obj2ast_expr()
5525 if (!PyList_Check(tmp)) { in obj2ast_expr()
5526 …Format(PyExc_TypeError, "Call field \"args\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5529 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5534 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5536 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5542 Py_XDECREF(tmp); in obj2ast_expr()
5543 tmp = NULL; in obj2ast_expr()
5552 tmp = PyObject_GetAttrString(obj, "keywords"); in obj2ast_expr()
5553 if (tmp == NULL) goto failed; in obj2ast_expr()
5554 if (!PyList_Check(tmp)) { in obj2ast_expr()
5555 …at(PyExc_TypeError, "Call field \"keywords\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5558 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5563 res = obj2ast_keyword(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5565 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5571 Py_XDECREF(tmp); in obj2ast_expr()
5572 tmp = NULL; in obj2ast_expr()
5579 tmp = PyObject_GetAttrString(obj, "starargs"); in obj2ast_expr()
5580 if (tmp == NULL) goto failed; in obj2ast_expr()
5581 res = obj2ast_expr(tmp, &starargs, arena); in obj2ast_expr()
5583 Py_XDECREF(tmp); in obj2ast_expr()
5584 tmp = NULL; in obj2ast_expr()
5590 tmp = PyObject_GetAttrString(obj, "kwargs"); in obj2ast_expr()
5591 if (tmp == NULL) goto failed; in obj2ast_expr()
5592 res = obj2ast_expr(tmp, &kwargs, arena); in obj2ast_expr()
5594 Py_XDECREF(tmp); in obj2ast_expr()
5595 tmp = NULL; in obj2ast_expr()
5613 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_expr()
5614 if (tmp == NULL) goto failed; in obj2ast_expr()
5615 res = obj2ast_expr(tmp, &value, arena); in obj2ast_expr()
5617 Py_XDECREF(tmp); in obj2ast_expr()
5618 tmp = NULL; in obj2ast_expr()
5636 tmp = PyObject_GetAttrString(obj, "n"); in obj2ast_expr()
5637 if (tmp == NULL) goto failed; in obj2ast_expr()
5638 res = obj2ast_object(tmp, &n, arena); in obj2ast_expr()
5640 Py_XDECREF(tmp); in obj2ast_expr()
5641 tmp = NULL; in obj2ast_expr()
5659 tmp = PyObject_GetAttrString(obj, "s"); in obj2ast_expr()
5660 if (tmp == NULL) goto failed; in obj2ast_expr()
5661 res = obj2ast_string(tmp, &s, arena); in obj2ast_expr()
5663 Py_XDECREF(tmp); in obj2ast_expr()
5664 tmp = NULL; in obj2ast_expr()
5684 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_expr()
5685 if (tmp == NULL) goto failed; in obj2ast_expr()
5686 res = obj2ast_expr(tmp, &value, arena); in obj2ast_expr()
5688 Py_XDECREF(tmp); in obj2ast_expr()
5689 tmp = NULL; in obj2ast_expr()
5696 tmp = PyObject_GetAttrString(obj, "attr"); in obj2ast_expr()
5697 if (tmp == NULL) goto failed; in obj2ast_expr()
5698 res = obj2ast_identifier(tmp, &attr, arena); in obj2ast_expr()
5700 Py_XDECREF(tmp); in obj2ast_expr()
5701 tmp = NULL; in obj2ast_expr()
5708 tmp = PyObject_GetAttrString(obj, "ctx"); in obj2ast_expr()
5709 if (tmp == NULL) goto failed; in obj2ast_expr()
5710 res = obj2ast_expr_context(tmp, &ctx, arena); in obj2ast_expr()
5712 Py_XDECREF(tmp); in obj2ast_expr()
5713 tmp = NULL; in obj2ast_expr()
5733 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_expr()
5734 if (tmp == NULL) goto failed; in obj2ast_expr()
5735 res = obj2ast_expr(tmp, &value, arena); in obj2ast_expr()
5737 Py_XDECREF(tmp); in obj2ast_expr()
5738 tmp = NULL; in obj2ast_expr()
5745 tmp = PyObject_GetAttrString(obj, "slice"); in obj2ast_expr()
5746 if (tmp == NULL) goto failed; in obj2ast_expr()
5747 res = obj2ast_slice(tmp, &slice, arena); in obj2ast_expr()
5749 Py_XDECREF(tmp); in obj2ast_expr()
5750 tmp = NULL; in obj2ast_expr()
5757 tmp = PyObject_GetAttrString(obj, "ctx"); in obj2ast_expr()
5758 if (tmp == NULL) goto failed; in obj2ast_expr()
5759 res = obj2ast_expr_context(tmp, &ctx, arena); in obj2ast_expr()
5761 Py_XDECREF(tmp); in obj2ast_expr()
5762 tmp = NULL; in obj2ast_expr()
5781 tmp = PyObject_GetAttrString(obj, "id"); in obj2ast_expr()
5782 if (tmp == NULL) goto failed; in obj2ast_expr()
5783 res = obj2ast_identifier(tmp, &id, arena); in obj2ast_expr()
5785 Py_XDECREF(tmp); in obj2ast_expr()
5786 tmp = NULL; in obj2ast_expr()
5793 tmp = PyObject_GetAttrString(obj, "ctx"); in obj2ast_expr()
5794 if (tmp == NULL) goto failed; in obj2ast_expr()
5795 res = obj2ast_expr_context(tmp, &ctx, arena); in obj2ast_expr()
5797 Py_XDECREF(tmp); in obj2ast_expr()
5798 tmp = NULL; in obj2ast_expr()
5819 tmp = PyObject_GetAttrString(obj, "elts"); in obj2ast_expr()
5820 if (tmp == NULL) goto failed; in obj2ast_expr()
5821 if (!PyList_Check(tmp)) { in obj2ast_expr()
5822 …Format(PyExc_TypeError, "List field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5825 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5830 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5832 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5838 Py_XDECREF(tmp); in obj2ast_expr()
5839 tmp = NULL; in obj2ast_expr()
5846 tmp = PyObject_GetAttrString(obj, "ctx"); in obj2ast_expr()
5847 if (tmp == NULL) goto failed; in obj2ast_expr()
5848 res = obj2ast_expr_context(tmp, &ctx, arena); in obj2ast_expr()
5850 Py_XDECREF(tmp); in obj2ast_expr()
5851 tmp = NULL; in obj2ast_expr()
5872 tmp = PyObject_GetAttrString(obj, "elts"); in obj2ast_expr()
5873 if (tmp == NULL) goto failed; in obj2ast_expr()
5874 if (!PyList_Check(tmp)) { in obj2ast_expr()
5875 …ormat(PyExc_TypeError, "Tuple field \"elts\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_expr()
5878 len = PyList_GET_SIZE(tmp); in obj2ast_expr()
5883 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_expr()
5885 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_expr()
5891 Py_XDECREF(tmp); in obj2ast_expr()
5892 tmp = NULL; in obj2ast_expr()
5899 tmp = PyObject_GetAttrString(obj, "ctx"); in obj2ast_expr()
5900 if (tmp == NULL) goto failed; in obj2ast_expr()
5901 res = obj2ast_expr_context(tmp, &ctx, arena); in obj2ast_expr()
5903 Py_XDECREF(tmp); in obj2ast_expr()
5904 tmp = NULL; in obj2ast_expr()
5914 tmp = PyObject_Repr(obj); in obj2ast_expr()
5915 if (tmp == NULL) goto failed; in obj2ast_expr()
5916 …Err_Format(PyExc_TypeError, "expected some sort of expr, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_expr()
5918 Py_XDECREF(tmp); in obj2ast_expr()
5925 PyObject* tmp = NULL; in obj2ast_expr_context() local
5977 tmp = PyObject_Repr(obj); in obj2ast_expr_context()
5978 if (tmp == NULL) goto failed; in obj2ast_expr_context()
5979 …at(PyExc_TypeError, "expected some sort of expr_context, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_expr_context()
5981 Py_XDECREF(tmp); in obj2ast_expr_context()
5988 PyObject* tmp = NULL; in obj2ast_slice() local
6017 tmp = PyObject_GetAttrString(obj, "lower"); in obj2ast_slice()
6018 if (tmp == NULL) goto failed; in obj2ast_slice()
6019 res = obj2ast_expr(tmp, &lower, arena); in obj2ast_slice()
6021 Py_XDECREF(tmp); in obj2ast_slice()
6022 tmp = NULL; in obj2ast_slice()
6028 tmp = PyObject_GetAttrString(obj, "upper"); in obj2ast_slice()
6029 if (tmp == NULL) goto failed; in obj2ast_slice()
6030 res = obj2ast_expr(tmp, &upper, arena); in obj2ast_slice()
6032 Py_XDECREF(tmp); in obj2ast_slice()
6033 tmp = NULL; in obj2ast_slice()
6039 tmp = PyObject_GetAttrString(obj, "step"); in obj2ast_slice()
6040 if (tmp == NULL) goto failed; in obj2ast_slice()
6041 res = obj2ast_expr(tmp, &step, arena); in obj2ast_slice()
6043 Py_XDECREF(tmp); in obj2ast_slice()
6044 tmp = NULL; in obj2ast_slice()
6063 tmp = PyObject_GetAttrString(obj, "dims"); in obj2ast_slice()
6064 if (tmp == NULL) goto failed; in obj2ast_slice()
6065 if (!PyList_Check(tmp)) { in obj2ast_slice()
6066 …at(PyExc_TypeError, "ExtSlice field \"dims\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_slice()
6069 len = PyList_GET_SIZE(tmp); in obj2ast_slice()
6074 res = obj2ast_slice(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_slice()
6076 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_slice()
6082 Py_XDECREF(tmp); in obj2ast_slice()
6083 tmp = NULL; in obj2ast_slice()
6101 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_slice()
6102 if (tmp == NULL) goto failed; in obj2ast_slice()
6103 res = obj2ast_expr(tmp, &value, arena); in obj2ast_slice()
6105 Py_XDECREF(tmp); in obj2ast_slice()
6106 tmp = NULL; in obj2ast_slice()
6116 tmp = PyObject_Repr(obj); in obj2ast_slice()
6117 if (tmp == NULL) goto failed; in obj2ast_slice()
6118 …rr_Format(PyExc_TypeError, "expected some sort of slice, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_slice()
6120 Py_XDECREF(tmp); in obj2ast_slice()
6127 PyObject* tmp = NULL; in obj2ast_boolop() local
6147 tmp = PyObject_Repr(obj); in obj2ast_boolop()
6148 if (tmp == NULL) goto failed; in obj2ast_boolop()
6149 …r_Format(PyExc_TypeError, "expected some sort of boolop, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_boolop()
6151 Py_XDECREF(tmp); in obj2ast_boolop()
6158 PyObject* tmp = NULL; in obj2ast_operator() local
6258 tmp = PyObject_Repr(obj); in obj2ast_operator()
6259 if (tmp == NULL) goto failed; in obj2ast_operator()
6260 …Format(PyExc_TypeError, "expected some sort of operator, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_operator()
6262 Py_XDECREF(tmp); in obj2ast_operator()
6269 PyObject* tmp = NULL; in obj2ast_unaryop() local
6305 tmp = PyObject_Repr(obj); in obj2ast_unaryop()
6306 if (tmp == NULL) goto failed; in obj2ast_unaryop()
6307 …_Format(PyExc_TypeError, "expected some sort of unaryop, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_unaryop()
6309 Py_XDECREF(tmp); in obj2ast_unaryop()
6316 PyObject* tmp = NULL; in obj2ast_cmpop() local
6400 tmp = PyObject_Repr(obj); in obj2ast_cmpop()
6401 if (tmp == NULL) goto failed; in obj2ast_cmpop()
6402 …rr_Format(PyExc_TypeError, "expected some sort of cmpop, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_cmpop()
6404 Py_XDECREF(tmp); in obj2ast_cmpop()
6411 PyObject* tmp = NULL; in obj2ast_comprehension() local
6418 tmp = PyObject_GetAttrString(obj, "target"); in obj2ast_comprehension()
6419 if (tmp == NULL) goto failed; in obj2ast_comprehension()
6420 res = obj2ast_expr(tmp, &target, arena); in obj2ast_comprehension()
6422 Py_XDECREF(tmp); in obj2ast_comprehension()
6423 tmp = NULL; in obj2ast_comprehension()
6430 tmp = PyObject_GetAttrString(obj, "iter"); in obj2ast_comprehension()
6431 if (tmp == NULL) goto failed; in obj2ast_comprehension()
6432 res = obj2ast_expr(tmp, &iter, arena); in obj2ast_comprehension()
6434 Py_XDECREF(tmp); in obj2ast_comprehension()
6435 tmp = NULL; in obj2ast_comprehension()
6444 tmp = PyObject_GetAttrString(obj, "ifs"); in obj2ast_comprehension()
6445 if (tmp == NULL) goto failed; in obj2ast_comprehension()
6446 if (!PyList_Check(tmp)) { in obj2ast_comprehension()
6447 …yExc_TypeError, "comprehension field \"ifs\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_comprehension()
6450 len = PyList_GET_SIZE(tmp); in obj2ast_comprehension()
6455 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_comprehension()
6457 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_comprehension()
6463 Py_XDECREF(tmp); in obj2ast_comprehension()
6464 tmp = NULL; in obj2ast_comprehension()
6472 Py_XDECREF(tmp); in obj2ast_comprehension()
6479 PyObject* tmp = NULL; in obj2ast_excepthandler() local
6491 tmp = PyObject_GetAttrString(obj, "lineno"); in obj2ast_excepthandler()
6492 if (tmp == NULL) goto failed; in obj2ast_excepthandler()
6493 res = obj2ast_int(tmp, &lineno, arena); in obj2ast_excepthandler()
6495 Py_XDECREF(tmp); in obj2ast_excepthandler()
6496 tmp = NULL; in obj2ast_excepthandler()
6503 tmp = PyObject_GetAttrString(obj, "col_offset"); in obj2ast_excepthandler()
6504 if (tmp == NULL) goto failed; in obj2ast_excepthandler()
6505 res = obj2ast_int(tmp, &col_offset, arena); in obj2ast_excepthandler()
6507 Py_XDECREF(tmp); in obj2ast_excepthandler()
6508 tmp = NULL; in obj2ast_excepthandler()
6524 tmp = PyObject_GetAttrString(obj, "type"); in obj2ast_excepthandler()
6525 if (tmp == NULL) goto failed; in obj2ast_excepthandler()
6526 res = obj2ast_expr(tmp, &type, arena); in obj2ast_excepthandler()
6528 Py_XDECREF(tmp); in obj2ast_excepthandler()
6529 tmp = NULL; in obj2ast_excepthandler()
6535 tmp = PyObject_GetAttrString(obj, "name"); in obj2ast_excepthandler()
6536 if (tmp == NULL) goto failed; in obj2ast_excepthandler()
6537 res = obj2ast_expr(tmp, &name, arena); in obj2ast_excepthandler()
6539 Py_XDECREF(tmp); in obj2ast_excepthandler()
6540 tmp = NULL; in obj2ast_excepthandler()
6548 tmp = PyObject_GetAttrString(obj, "body"); in obj2ast_excepthandler()
6549 if (tmp == NULL) goto failed; in obj2ast_excepthandler()
6550 if (!PyList_Check(tmp)) { in obj2ast_excepthandler()
6551 …Exc_TypeError, "ExceptHandler field \"body\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_excepthandler()
6554 len = PyList_GET_SIZE(tmp); in obj2ast_excepthandler()
6559 res = obj2ast_stmt(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_excepthandler()
6561 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_excepthandler()
6567 Py_XDECREF(tmp); in obj2ast_excepthandler()
6568 tmp = NULL; in obj2ast_excepthandler()
6579 tmp = PyObject_Repr(obj); in obj2ast_excepthandler()
6580 if (tmp == NULL) goto failed; in obj2ast_excepthandler()
6581 …t(PyExc_TypeError, "expected some sort of excepthandler, but got %.400s", PyString_AS_STRING(tmp)); in obj2ast_excepthandler()
6583 Py_XDECREF(tmp); in obj2ast_excepthandler()
6590 PyObject* tmp = NULL; in obj2ast_arguments() local
6600 tmp = PyObject_GetAttrString(obj, "args"); in obj2ast_arguments()
6601 if (tmp == NULL) goto failed; in obj2ast_arguments()
6602 if (!PyList_Check(tmp)) { in obj2ast_arguments()
6603 …t(PyExc_TypeError, "arguments field \"args\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_arguments()
6606 len = PyList_GET_SIZE(tmp); in obj2ast_arguments()
6611 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_arguments()
6613 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_arguments()
6619 Py_XDECREF(tmp); in obj2ast_arguments()
6620 tmp = NULL; in obj2ast_arguments()
6627 tmp = PyObject_GetAttrString(obj, "vararg"); in obj2ast_arguments()
6628 if (tmp == NULL) goto failed; in obj2ast_arguments()
6629 res = obj2ast_identifier(tmp, &vararg, arena); in obj2ast_arguments()
6631 Py_XDECREF(tmp); in obj2ast_arguments()
6632 tmp = NULL; in obj2ast_arguments()
6638 tmp = PyObject_GetAttrString(obj, "kwarg"); in obj2ast_arguments()
6639 if (tmp == NULL) goto failed; in obj2ast_arguments()
6640 res = obj2ast_identifier(tmp, &kwarg, arena); in obj2ast_arguments()
6642 Py_XDECREF(tmp); in obj2ast_arguments()
6643 tmp = NULL; in obj2ast_arguments()
6651 tmp = PyObject_GetAttrString(obj, "defaults"); in obj2ast_arguments()
6652 if (tmp == NULL) goto failed; in obj2ast_arguments()
6653 if (!PyList_Check(tmp)) { in obj2ast_arguments()
6654 …Exc_TypeError, "arguments field \"defaults\" must be a list, not a %.200s", tmp->ob_type->tp_name); in obj2ast_arguments()
6657 len = PyList_GET_SIZE(tmp); in obj2ast_arguments()
6662 res = obj2ast_expr(PyList_GET_ITEM(tmp, i), &val, arena); in obj2ast_arguments()
6664 if (len != PyList_GET_SIZE(tmp)) { in obj2ast_arguments()
6670 Py_XDECREF(tmp); in obj2ast_arguments()
6671 tmp = NULL; in obj2ast_arguments()
6679 Py_XDECREF(tmp); in obj2ast_arguments()
6686 PyObject* tmp = NULL; in obj2ast_keyword() local
6692 tmp = PyObject_GetAttrString(obj, "arg"); in obj2ast_keyword()
6693 if (tmp == NULL) goto failed; in obj2ast_keyword()
6694 res = obj2ast_identifier(tmp, &arg, arena); in obj2ast_keyword()
6696 Py_XDECREF(tmp); in obj2ast_keyword()
6697 tmp = NULL; in obj2ast_keyword()
6704 tmp = PyObject_GetAttrString(obj, "value"); in obj2ast_keyword()
6705 if (tmp == NULL) goto failed; in obj2ast_keyword()
6706 res = obj2ast_expr(tmp, &value, arena); in obj2ast_keyword()
6708 Py_XDECREF(tmp); in obj2ast_keyword()
6709 tmp = NULL; in obj2ast_keyword()
6717 Py_XDECREF(tmp); in obj2ast_keyword()
6724 PyObject* tmp = NULL; in obj2ast_alias() local
6730 tmp = PyObject_GetAttrString(obj, "name"); in obj2ast_alias()
6731 if (tmp == NULL) goto failed; in obj2ast_alias()
6732 res = obj2ast_identifier(tmp, &name, arena); in obj2ast_alias()
6734 Py_XDECREF(tmp); in obj2ast_alias()
6735 tmp = NULL; in obj2ast_alias()
6742 tmp = PyObject_GetAttrString(obj, "asname"); in obj2ast_alias()
6743 if (tmp == NULL) goto failed; in obj2ast_alias()
6744 res = obj2ast_identifier(tmp, &asname, arena); in obj2ast_alias()
6746 Py_XDECREF(tmp); in obj2ast_alias()
6747 tmp = NULL; in obj2ast_alias()
6754 Py_XDECREF(tmp); in obj2ast_alias()