*.pyx, defs.pxi, grim.h: Add awful casts to `PyObject_AsReadBuffer'.
[mLib-python] / selpk.pyx
index ed08fcd..7e3de7e 100644 (file)
--- a/selpk.pyx
+++ b/selpk.pyx
@@ -93,7 +93,7 @@ cdef void _selpkfunc(unsigned char *p, size_t n, pkbuf *pk,
   else:
     r = pb.packet(PyString_FromStringAndSize(<char *>p, n))
     if r is not None:
-      PyObject_AsReadBuffer(r, &rp, &rn)
+      PyObject_AsReadBuffer(r, <cvp *>&rp, &rn)
       if rn > n:
         raise ValueError, 'remaining buffer too large'
       if rn: