X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/62ce807dc4c91a2e47097ba919e7ae4e0cef9448..ae5dbbad6a05a824599c6655ec9ae9d579e9c30d:/mp.c diff --git a/mp.c b/mp.c index e9268e5..f2a00b9 100644 --- a/mp.c +++ b/mp.c @@ -211,6 +211,7 @@ mp *tomp(PyObject *o) return (MP_COPY(PFILT_F(o)->m)); else if (ECPT_PYCHECK(o)) { ec p = EC_INIT; + if (EC_ATINF(ECPT_P(o))) return (0); getecptout(&p, o); x = MP_COPY(p.x); EC_DESTROY(&p); @@ -1679,7 +1680,7 @@ static PyObject *mcmeth_solve(PyObject *me, PyObject *arg) PyObject *q = 0, *x, *z = 0; mp *xx; mp **v = 0; - int i = 0, n = c->k; + Py_ssize_t i = 0, n = c->k; Py_INCREF(me); if (PyTuple_Size(arg) == n) @@ -1718,7 +1719,7 @@ static void mpcrt_pydealloc(PyObject *me) static PyObject *mpcrt_pynew(PyTypeObject *ty, PyObject *arg, PyObject *kw) { mpcrt_mod *v = 0; - int n, i = 0, j; + Py_ssize_t n, i = 0, j; char *kwlist[] = { "mv", 0 }; PyObject *q = 0, *x; mp *xx = MP_NEW, *y = MP_NEW, *g = MP_NEW;