if (ECPT_PYCHECK(x)) { PyObject *t; t = x; x = y; y = t; }
if (!ECPT_PYCHECK(y) || (xx = tomp(x)) == 0) RETURN_NOTIMPL;
ec_imul(ECPT_C(y), &zz, ECPT_P(y), xx);
+ MP_DROP(xx);
return (ecpt_pywrap(ECPT_COBJ(y), &zz));
}
char *p;
ec_curve *c = ECPT_C(me);
ec pp = EC_INIT;
- int f = EC_EXPLY;
+ unsigned f = EC_EXPLY;
int len;
char *kwlist[] = { "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "|i:ectosp", kwlist, &f))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "|O&:ec2osp", kwlist,
+ convuint, &f))
return (0);
len = c->f->noctets * 2 + 1;
rc = bytestring_pywrap(0, len);
static PyObject *eccurve_pyrichcompare(PyObject *x, PyObject *y, int op)
{
- int b = ec_samep(ECCURVE_C(x), ECCURVE_C(y));
+ int b;
+
+ assert(ECCURVE_PYCHECK(x));
+ if (!ECCURVE_PYCHECK(y)) RETURN_NOTIMPL;
+ b = ec_samep(ECCURVE_C(x), ECCURVE_C(y));
switch (op) {
case Py_EQ: break;
case Py_NE: b = !b; break;
buf b;
PyObject *rc = 0;
ec_curve *cc;
- int f = EC_XONLY | EC_LSB | EC_SORT | EC_EXPLY;
+ unsigned f = EC_XONLY | EC_LSB | EC_SORT | EC_EXPLY;
ec pp = EC_INIT;
- char *kwlist[] = { "buf", "flags", 0 };
+ char *kwlist[] = { "class", "buf", "flags", 0 };
- if (!PyArg_ParseTupleAndKeywords(arg, kw, "Os#|f:os2ecp", kwlist,
- &me, &p, &len, &f))
+ if (!PyArg_ParseTupleAndKeywords(arg, kw, "Os#|O&:os2ecp", kwlist,
+ &me, &p, &len, convuint, &f))
return (0);
buf_init(&b, p, len);
cc = ECCURVE_C(me);