fix compilation errors

This commit is contained in:
YAMAMOTO Takashi 2013-06-03 13:18:52 +09:00
parent d4bb86c0c8
commit 3dbb2d1e7e

View file

@ -4,7 +4,7 @@
from cpython cimport *
cdef extern from "Python.h":
ctypedef struct PyObject
cdef int PyObject_AsReadBuffer(object o, const void* buff, Py_ssize_t* buf_len) except -1
cdef int PyObject_AsReadBuffer(object o, const void** buff, Py_ssize_t* buf_len) except -1
from libc.stdlib cimport *
from libc.string cimport *
@ -95,7 +95,7 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
cdef char* cenc = NULL
cdef char* cerr = NULL
PyObject_AsReadBuffer(packed, <const void*>&buf, &buf_len)
PyObject_AsReadBuffer(packed, <const void**>&buf, &buf_len)
if encoding is not None:
if isinstance(encoding, unicode):