*.pyx, defs.pxi, *.c: Fixes for 64-bit builds.
[mLib-python] / fdutils.pyx
index 8e5d94a..68e0568 100644 (file)
@@ -34,7 +34,7 @@ def fdflags(file,
 
 def fdsend(sock, file, buffer):
   cdef void *p
-  cdef int len
+  cdef Py_ssize_t len
   cdef int rc
   PyObject_AsReadBuffer(buffer, &p, &len)
   rc = fdpass_send(_getfd(sock), _getfd(file), p, len)
@@ -45,7 +45,7 @@ def fdsend(sock, file, buffer):
 def fdrecv(sock, unsigned size):
   cdef void *p
   cdef buf
-  cdef int len
+  cdef Py_ssize_t len
   cdef PyObject *obj
   cdef int fd
   buf = PyString_FromStringAndSize(NULL, size)