X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/b76bb84135462baf905f6240946d3e6d51271a82..688625b6d288ff893f5e96dd3bd7f10110e23639:/mp.c diff --git a/mp.c b/mp.c index e7cb557..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; @@ -2403,7 +2404,7 @@ static PyObject *gfnget_beta(PyObject *me, void *hunoz) end: \ mp_drop(xx); \ if (!z) return (0); \ - return (mp_pywrap(z)); \ + return (gf_pywrap(z)); \ } XFORMOP(pton, PTON) XFORMOP(ntop, NTOP)