summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2013-05-19 12:32:33 +0900
committerINADA Naoki <inada-n@klab.com>2013-05-19 12:32:33 +0900
commit956f55ecdf3b98e8072b4073da650e9a8fa05e0b (patch)
tree8cfc70e2f53c349eddcab8aa3be79ce545947ef9
parentbbe86e7a925f113337f6e24d3ff24ddc30137dd6 (diff)
downloadmsgpack-python-956f55ecdf3b98e8072b4073da650e9a8fa05e0b.tar.gz
Stop using const_void_ptr typedef.
New Cython supports const natively.
-rw-r--r--msgpack/_unpacker.pyx5
1 files changed, 2 insertions, 3 deletions
diff --git a/msgpack/_unpacker.pyx b/msgpack/_unpacker.pyx
index 2644f15..9ff1085 100644
--- a/msgpack/_unpacker.pyx
+++ b/msgpack/_unpacker.pyx
@@ -3,9 +3,8 @@
from cpython cimport *
cdef extern from "Python.h":
- ctypedef char* const_void_ptr "const void*"
ctypedef struct PyObject
- cdef int PyObject_AsReadBuffer(object o, const_void_ptr* 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 *
@@ -96,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_ptr*>&buf, &buf_len)
+ PyObject_AsReadBuffer(packed, <const void*>&buf, &buf_len)
if encoding is not None:
if isinstance(encoding, unicode):