return (0);
}
-static PyObject *meth__ByteString_zero(PyObject *me, PyObject *arg)
+static PyObject *bymeth_zero(PyObject *me, PyObject *arg)
{
size_t sz;
PyObject *rc = 0;
- if (!PyArg_ParseTuple(arg, "OO&:zero", &me, convszt, &sz)) goto end;
+ if (!PyArg_ParseTuple(arg, "O&:zero", convszt, &sz)) goto end;
rc = bytestring_pywrap(0, sz);
memset(PyString_AS_STRING(rc), 0, sz);
end:
}
UNOP(not, ~)
+static const PyMethodDef bytestring_pymethods[] = {
+#define METHNAME(name) bymeth_##name
+ SMTH (zero, "zero(N) -> 0000...00")
+#undef METHNAME
+ { 0 }
+};
+
static const PyNumberMethods bytestring_pynumber = {
0, /* @nb_add@ */
0, /* @nb_subtract@ */
0, /* @tp_weaklistoffset@ */
0, /* @tp_iter@ */
0, /* @tp_iternext@ */
- 0, /* @tp_methods@ */
+ PYMETHODS(bytestring), /* @tp_methods@ */
0, /* @tp_members@ */
0, /* @tp_getset@ */
0, /* @tp_base@ */
static const PyMethodDef methods[] = {
#define METHNAME(func) meth_##func
METH (ctstreq, "ctstreq(S, T) -> BOOL")
- METH (_ByteString_zero, "zero(N) -> 0000...00")
#undef METHNAME
{ 0 }
};