{ 0 }
};
-static PyTypeObject gfshare_pytype_skel = {
+static const PyTypeObject gfshare_pytype_skel = {
PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
"GFShare", /* @tp_name@ */
sizeof(gfshare_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject gfsharesplit_pytype_skel = {
+static const PyTypeObject gfsharesplit_pytype_skel = {
PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
"GFShareSplit", /* @tp_name@ */
sizeof(gfshare_pyobj), /* @tp_basicsize@ */
return (0);
}
-static PyObject *gfsmeth_combine(PyObject *me, PyObject *arg)
+static PyObject *gfsmeth_combine(PyObject *me)
{
PyObject *rc = 0;
- if (!PyArg_ParseTuple(arg, ":combine")) goto end;
if (GFSHARE_S(me)->i < GFSHARE_S(me)->t) VALERR("not enough shares yet");
rc = bytestring_pywrap(0, GFSHARE_S(me)->sz);
gfshare_combine(GFSHARE_S(me), PyString_AS_STRING(rc));
#define METHNAME(name) gfsmeth_##name
METH (addedp, "S.addedp(I) -> BOOL")
METH (add, "S.add(I, SHARE) -> REMAIN")
- METH (combine, "S.combine() -> SECRET")
+ NAMETH(combine, "S.combine() -> SECRET")
#undef METHNAME
{ 0 }
};
{ 0 }
};
-static PyTypeObject gfsharejoin_pytype_skel = {
+static const PyTypeObject gfsharejoin_pytype_skel = {
PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
"GFShareJoin", /* @tp_name@ */
sizeof(gfshare_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject share_pytype_skel = {
+static const PyTypeObject share_pytype_skel = {
PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
"Share", /* @tp_name@ */
sizeof(share_pyobj), /* @tp_basicsize@ */
{ 0 }
};
-static PyTypeObject sharesplit_pytype_skel = {
+static const PyTypeObject sharesplit_pytype_skel = {
PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
"ShareSplit", /* @tp_name@ */
sizeof(share_pyobj), /* @tp_basicsize@ */
return (rc);
}
-static PyObject *smeth_combine(PyObject *me, PyObject *arg)
+static PyObject *smeth_combine(PyObject *me)
{
PyObject *rc = 0;
- if (!PyArg_ParseTuple(arg, ":combine")) goto end;
if (SHARE_S(me)->i < SHARE_S(me)->t) VALERR("not enough shares yet");
rc = mp_pywrap(share_combine(SHARE_S(me)));
end:
#define METHNAME(name) smeth_##name
METH (addedp, "S.addedp(I) -> BOOL")
METH (add, "S.add(I, SHARE) -> REMAIN")
- METH (combine, "S.combine() -> SECRET")
+ NAMETH(combine, "S.combine() -> SECRET")
#undef METHNAME
{ 0 }
};
{ 0 }
};
-static PyTypeObject sharejoin_pytype_skel = {
+static const PyTypeObject sharejoin_pytype_skel = {
PyObject_HEAD_INIT(&PyType_Type) 0, /* Header */
"ShareJoin", /* @tp_name@ */
sizeof(share_pyobj), /* @tp_basicsize@ */