X-Git-Url: https://git.distorted.org.uk/~mdw/mLib-python/blobdiff_plain/5b1830f325c55c70d65fd020f08dd958493e528d..78911cdb6782ddccef6de3cc913b714e10d2fc14:/crc32.pyx diff --git a/crc32.pyx b/crc32.pyx index 5790d24..5584df2 100644 --- 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)