X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib-python/blobdiff_plain/2fa7b5dbd2e7b53d4f91cd9136263658933f56f0..7c66d8c9ef1bf4cd701c6eb3da64d2b861cd6f6c:/codec.pyx diff --git a/codec.pyx b/codec.pyx index 1b395af..b9f910f 100644 --- a/codec.pyx +++ b/codec.pyx @@ -108,14 +108,14 @@ cdef class _BaseCodec: me.c.ops.destroy(me.c) cdef code(me, text, int finishp): cdef void *p - cdef int len + cdef Py_ssize_t len cdef dstr d cdef int err if me.c is NULL: raise ValueError, 'Encoding finished' DCREATE(&d) try: - PyObject_AsReadBuffer(text, &p, &len) + PyObject_AsReadBuffer(text, &p, &len) code(me.c, p, len, &d) if finishp: code(me.c, NULL, 0, &d)