return (rc);
}
-static PyObject *epmeth_oncurvep(PyObject *me, PyObject *arg)
+static PyObject *epmeth_oncurvep(PyObject *me)
{
- if (!PyArg_ParseTuple(arg, ":oncurvep")) return (0);
return (getbool(EC_ATINF(ECPT_P(me)) ||
!EC_CHECK(ECPT_C(me), ECPT_P(me))));
}
-static PyObject *epmeth_dbl(PyObject *me, PyObject *arg)
+static PyObject *epmeth_dbl(PyObject *me)
{
ec p = EC_INIT;
- if (!PyArg_ParseTuple(arg, ":dbl")) return (0);
EC_DBL(ECPT_C(me), &p, ECPT_P(me));
return (ecpt_pywrap(ECPT_COBJ(me), &p));
}
-static PyObject *epmeth_tobuf(PyObject *me, PyObject *arg)
+static PyObject *epmeth_tobuf(PyObject *me)
{
buf b;
ec p = EC_INIT;
PyObject *rc;
size_t n;
- if (!PyArg_ParseTuple(arg, ":tobuf")) return (0);
getecptout(&p, me);
if (EC_ATINF(&p))
n = 2;
return (rc);
}
-static PyObject *epmeth_toraw(PyObject *me, PyObject *arg)
+static PyObject *epmeth_toraw(PyObject *me)
{
buf b;
PyObject *rc;
ec pp = EC_INIT;
int len;
- if (!PyArg_ParseTuple(arg, ":toraw")) return (0);
len = c->f->noctets * 2 + 1;
rc = bytestring_pywrap(0, len);
p = PyString_AS_STRING(rc);
static const PyMethodDef ecptnc_pymethods[] = {
#define METHNAME(func) epmeth_##func
- METH (tobuf, "X.tobuf() -> BIN")
+ NAMETH(tobuf, "X.tobuf() -> BIN")
CMTH (frombuf, "frombuf(STR) -> (P, REST)")
CMTH (parse, "parse(STR) -> (P, REST)")
#undef METHNAME
static const PyMethodDef ecpt_pymethods[] = {
#define METHNAME(func) epmeth_##func
- METH (toraw, "X.toraw() -> BIN")
+ NAMETH(toraw, "X.toraw() -> BIN")
KWMETH(ec2osp, "X.ec2osp([flags = EC_EXPLY]) -> BIN")
- METH (dbl, "X.dbl() -> X + X")
- METH (oncurvep, "X.oncurvep() -> BOOL")
+ NAMETH(dbl, "X.dbl() -> X + X")
+ NAMETH(oncurvep, "X.oncurvep() -> BOOL")
CMTH (fromraw, "fromraw(STR) -> (P, REST)")
KWCMTH(os2ecp, "os2ecp(STR, [flags = ...]) -> (P, REST)")
#undef METHNAME