chiark / gitweb /
*.pyx: Replace __new__ with __cinit__ like the program says.
[mLib-python] / fdutils.pyx
index c6ba79e2c82a36465fbdb8dfb990712001aaaeb3..0236caf9c0c482572b9ebf6ce3153309fd7c9107 100644 (file)
@@ -50,7 +50,7 @@ def fdrecv(sock, unsigned size):
   cdef int len
   cdef PyObject *obj
   cdef int fd
-  buf = PyString_FromStringAndSize(NULL, len)
+  buf = PyString_FromStringAndSize(NULL, size)
   p = PyString_AS_STRING(buf)
   len = fdpass_recv(_getfd(sock), &fd, p, size)
   if len < 0: