comparison Python/Python-ast.c @ 73700:470f7d7c57ce 3.2

Issue #13436: commit regenerated Python-ast.c
author Amaury Forgeot d'Arc <amauryfa@gmail.com>
date Tue, 22 Nov 2011 21:52:30 +0100
parents c8b6d4417274
children 53cc2668d54f
comparison
equal deleted inserted replaced
73699:ffcdfc534942 73700:470f7d7c57ce
620 620
621 static int obj2ast_int(PyObject* obj, int* out, PyArena* arena) 621 static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
622 { 622 {
623 int i; 623 int i;
624 if (!PyLong_Check(obj)) { 624 if (!PyLong_Check(obj)) {
625 PyObject *s = PyObject_Repr(obj); 625 PyErr_Format(PyExc_ValueError, "invalid integer value: %R", obj);
626 if (s == NULL) return 1;
627 PyErr_Format(PyExc_ValueError, "invalid integer value: %.400s",
628 PyBytes_AS_STRING(s));
629 Py_DECREF(s);
630 return 1; 626 return 1;
631 } 627 }
632 628
633 i = (int)PyLong_AsLong(obj); 629 i = (int)PyLong_AsLong(obj);
634 if (i == -1 && PyErr_Occurred()) 630 if (i == -1 && PyErr_Occurred())