return (-1);
}
-static PyGetSetDef rbuf_pygetset[] = {
+static const PyGetSetDef rbuf_pygetset[] = {
#define GETSETNAME(op, name) rb##op##_##name
GET (size, "RBUF.size -> SIZE")
GET (left, "RBUF.left -> REMAINDER")
{ 0 }
};
-static PyMethodDef rbuf_pymethods[] = {
+static const PyMethodDef rbuf_pymethods[] = {
#define METHNAME(func) rbmeth_##func
METH (skip, "RBUF.skip(N)")
METH (get, "RBUF.get(N) -> BYTES")
{ 0 }
};
-static PyBufferProcs rbuf_pybuffer = {
+static const PyBufferProcs rbuf_pybuffer = {
rbuf_pyreadbuf, /* @bf_getreadbuffer@ */
0, /* @bf_getwritebuffer@ */
rbuf_pysegcount, /* @bf_getsegcount@ */
0, /* @tp_str@ */
0, /* @tp_getattro@ */
0, /* @tp_setattro@ */
- &rbuf_pybuffer, /* @tp_as_buffer@ */
+ PYBUFFER(rbuf), /* @tp_as_buffer@ */
Py_TPFLAGS_DEFAULT | /* @tp_flags@ */
Py_TPFLAGS_BASETYPE,
0, /* @tp_weaklistoffset@ */
0, /* @tp_iter@ */
0, /* @tp_iternext@ */
- rbuf_pymethods, /* @tp_methods@ */
+ PYMETHODS(rbuf), /* @tp_methods@ */
0, /* @tp_members@ */
- rbuf_pygetset, /* @tp_getset@ */
+ PYGETSET(rbuf), /* @tp_getset@ */
0, /* @tp_base@ */
0, /* @tp_dict@ */
0, /* @tp_descr_get@ */
static PyObject *wbget_contents(PyObject *me, void *hunoz)
{ return (bytestring_pywrap(BBASE(BUF_B(me)), BLEN(BUF_B(me)))); }
-static PyGetSetDef wbuf_pygetset[] = {
+static const PyGetSetDef wbuf_pygetset[] = {
#define GETSETNAME(op, name) wb##op##_##name
GET (size, "WBUF.size -> SIZE")
GET (contents, "WBUF.contents -> STR")
{ 0 }
};
-static PyMethodDef wbuf_pymethods[] = {
+static const PyMethodDef wbuf_pymethods[] = {
#define METHNAME(func) wbmeth_##func
METH (zero, "WBUF.zero(N)")
METH (put, "WBUF.put(BYTES)")
{ 0 }
};
-static PyBufferProcs wbuf_pybuffer = {
+static const PyBufferProcs wbuf_pybuffer = {
wbuf_pyreadbuf, /* @bf_getreadbuffer@ */
0, /* @bf_getwritebuffer@ */
wbuf_pysegcount, /* @bf_getsegcount@ */
0, /* @tp_str@ */
0, /* @tp_getattro@ */
0, /* @tp_setattro@ */
- &wbuf_pybuffer, /* @tp_as_buffer@ */
+ PYBUFFER(wbuf), /* @tp_as_buffer@ */
Py_TPFLAGS_DEFAULT | /* @tp_flags@ */
Py_TPFLAGS_BASETYPE,
0, /* @tp_weaklistoffset@ */
0, /* @tp_iter@ */
0, /* @tp_iternext@ */
- wbuf_pymethods, /* @tp_methods@ */
+ PYMETHODS(wbuf), /* @tp_methods@ */
0, /* @tp_members@ */
- wbuf_pygetset, /* @tp_getset@ */
+ PYGETSET(wbuf), /* @tp_getset@ */
0, /* @tp_base@ */
0, /* @tp_dict@ */
0, /* @tp_descr_get@ */