From: Mark Wooding Date: Sun, 24 Nov 2019 21:45:37 +0000 (+0000) Subject: ec.c: Accept field elements in the fast path from `samep' fields. X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/70db226ce151a3b87e458e9ffc1ed4438fa5d19f ec.c: Accept field elements in the fast path from `samep' fields. ... as well as from the same field object. --- diff --git a/ec.c b/ec.c index 9535240..444af3b 100644 --- a/ec.c +++ b/ec.c @@ -467,7 +467,7 @@ static PyObject *epget__z(PyObject *me, void *hunoz) static mp *coord_in(field *f, PyObject *x) { mp *xx; - if (FE_PYCHECK(x) && FE_F(x) == f) + if (FE_PYCHECK(x) && (FE_F(x) == f || field_samep(FE_F(x), f))) return (MP_COPY(FE_X(x))); else if ((xx = getmp(x)) == 0) return (0);