Commits

Lenard Lindstrom  committed b59ccbb

For BufferProxy old buffer support, handle (void *) better.

This is towards improving compatibility with PyPy.

  • Participants
  • Parent commits 56e0ead

Comments (0)

Files changed (1)

File src/bufferproxy.c

     if (len < 0) {
         return 0;
     }
-    return Py_BuildValue("ll", (long)len, (long)ptr);
+    return Py_BuildValue("nN", len, PyLong_FromVoidPtr(ptr));
 }
 
 static PyObject *
     if (len < 0) {
         return 0;
     }
-    return Py_BuildValue("ll", (long)len, (long)ptr);
+    return Py_BuildValue("nN", len, PyLong_FromVoidPtr(ptr));
 }
 
 static PyObject *