*.pyx, defs.pxi, grim.h: Add awful casts to `PyObject_AsReadBuffer'.
[mLib-python] / codec.pyx
index aa5e692..b9f910f 100644 (file)
--- a/codec.pyx
+++ b/codec.pyx
@@ -115,7 +115,7 @@ cdef class _BaseCodec:
       raise ValueError, 'Encoding finished'
     DCREATE(&d)
     try:
-      PyObject_AsReadBuffer(text, &p, &len)
+      PyObject_AsReadBuffer(text, <cvp *>&p, &len)
       code(me.c, p, len, &d)
       if finishp:
         code(me.c, NULL, 0, &d)