*.pyx, defs.pxi, grim.h: Add awful casts to `PyObject_AsReadBuffer'.
[mLib-python] / crc32.pyx
index 5584df2..c1f3b82 100644 (file)
--- a/crc32.pyx
+++ b/crc32.pyx
@@ -32,7 +32,7 @@ cdef class CRC32:
   def chunk(me, data):
     cdef void *p
     cdef Py_ssize_t n
-    PyObject_AsReadBuffer(data, &p, &n)
+    PyObject_AsReadBuffer(data, <cvp *>&p, &n)
     me._a = c_crc32(me._a, p, n)
     return me
   def done(me):
@@ -42,7 +42,7 @@ def crc32(data):
   cdef void *p
   cdef Py_ssize_t n
   cdef uint32 c
-  PyObject_AsReadBuffer(data, &p, &n)
+  PyObject_AsReadBuffer(data, <cvp *>&p, &n)
   c = c_crc32(0, p, n)
   return _u32(c)