Merge branch 3.2

This commit is contained in:
Amaury Forgeot d'Arc 2011-11-22 22:02:01 +01:00
commit 942d5ba125
5 changed files with 19 additions and 13 deletions

View file

@ -844,11 +844,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
{
int i;
if (!PyLong_Check(obj)) {
PyObject *s = PyObject_Repr(obj);
if (s == NULL) return 1;
PyErr_Format(PyExc_ValueError, "invalid integer value: %.400s",
PyBytes_AS_STRING(s));
Py_DECREF(s);
PyErr_Format(PyExc_ValueError, "invalid integer value: %R", obj);
return 1;
}