{ if (nn) *nn = BSZ(BUF_B(me)); return (1); }
static int rbuf_pyreadbuf(PyObject *me, int seg, void **q)
- { assert(seg == 0); *q = BBASE(BUF_B(me)); return (BSZ(BUF_B(me))); }
+ { assert(seg == 0); *q = BCUR(BUF_B(me)); return (BLEFT(BUF_B(me))); }
static PyObject *rbmeth_skip(PyObject *me, PyObject *arg)
{
uint##n x; \
if (!PyArg_ParseTuple(arg, ":getu" #w)) goto end; \
if (buf_getu##w(BUF_B(me), &x)) BUFERR(); \
- return (getu32(x)); \
+ return (getulong(x)); \
end: \
return (0); \
}
static int rbset_offset(PyObject *me, PyObject *x, void *hunoz)
{
size_t n;
+ if (!x) NIERR("__del__");
if (!convszt(x, &n)) goto end;
if (n > BSZ(BUF_B(me))) VALERR("out of range");
BCUR(BUF_B(me)) = BBASE(BUF_B(me)) + n;