chiark / gitweb /
ident.pyx: Remove traces of bogus `failed' and `eof' callbacks.
[mLib-python] / fdutils.pyx
index 8e5d94a098e1daea9b2609e4f38243831989b5f9..bb28188ae162231ea5d7adab0feee4cc5e3621f7 100644 (file)
@@ -34,9 +34,9 @@ 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)
+  PyObject_AsReadBuffer(buffer, <cvp *>&p, &len)
   rc = fdpass_send(_getfd(sock), _getfd(file), p, len)
   if rc < 0:
     _oserror()
@@ -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)