I'm fed of writing `C.ByteString(buf)'.
static PyObject *wbget_size(PyObject *me, void *hunoz)
{ return (PyInt_FromLong(BLEN(BUF_B(me)))); }
static PyObject *wbget_size(PyObject *me, void *hunoz)
{ return (PyInt_FromLong(BLEN(BUF_B(me)))); }
+static PyObject *wbget_contents(PyObject *me, void *hunoz)
+ { return (bytestring_pywrap(BBASE(BUF_B(me)), BLEN(BUF_B(me)))); }
+
static PyGetSetDef wbuf_pygetset[] = {
#define GETSETNAME(op, name) wb##op##_##name
GET (size, "WBUF.size -> SIZE")
static PyGetSetDef wbuf_pygetset[] = {
#define GETSETNAME(op, name) wb##op##_##name
GET (size, "WBUF.size -> SIZE")
+ GET (contents, "WBUF.contents -> STR")
#undef GETSETNAME
{ 0 }
};
#undef GETSETNAME
{ 0 }
};