X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/blobdiff_plain/2465e84b75fbf7ca31b57d3a11ea8f84dacb9254..437234191fb9819a9a7e27ee777a5af76ec6f0b1:/ec.c diff --git a/ec.c b/ec.c index c006926..30dc50c 100644 --- a/ec.c +++ b/ec.c @@ -453,7 +453,7 @@ static int ecptxl_1(ec_curve *c, ec *p, PyObject *x) getecptout(p, x); goto fix; } else if (PyString_Check(x)) { - if (PyObject_AsReadBuffer(x, &q, 0)) + if (PyObject_AsReadBuffer(x, &q, &n)) goto end; qd.p = q; qd.e = 0; @@ -1063,7 +1063,7 @@ static PyMethodDef eccurve_pymethods[] = { METH (mmul, "\ E.mmul([(P0, N0), (P1, N1), ...]) = N0 P0 + N1 P1 + ...") METH (find, "E.find(X) -> P") - KWMETH(rand, "E.rand(rng = rand) ->P") + KWMETH(rand, "E.rand([rng = rand]) -> P") #undef METHNAME { 0 } };