X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb-python/blobdiff_plain/42d30ef60edcafe5b5f85f8c0e7d7637ed0a84fc..5779eaf1c6c738aac2227dcadb9e8c27ca22631e:/pgen.c diff --git a/pgen.c b/pgen.c index 24639ec..108fa31 100644 --- a/pgen.c +++ b/pgen.c @@ -120,9 +120,8 @@ static PyObject *pfilt_pyint(PyObject *me) long l; PyObject *rc = 0; - if (mp_tolong_checked(PFILT_F(me)->m, &l)) goto end; - rc = PyInt_FromLong(l); -end: + if (!mp_tolong_checked(PFILT_F(me)->m, &l, 0)) rc = PyInt_FromLong(l); + else rc = mp_topylong(PFILT_F(me)->m); return (rc); }