*.pyx, defs.pxi, *.c: Fixes for 64-bit builds.
[mLib-python] / crc32.pyx
index 5790d24..5584df2 100644 (file)
--- a/crc32.pyx
+++ b/crc32.pyx
@@ -31,7 +31,7 @@ cdef class CRC32:
     pass
   def chunk(me, data):
     cdef void *p
-    cdef int n
+    cdef Py_ssize_t n
     PyObject_AsReadBuffer(data, &p, &n)
     me._a = c_crc32(me._a, p, n)
     return me
@@ -40,7 +40,7 @@ cdef class CRC32:
 
 def crc32(data):
   cdef void *p
-  cdef int n
+  cdef Py_ssize_t n
   cdef uint32 c
   PyObject_AsReadBuffer(data, &p, &n)
   c = c_crc32(0, p, n)