Skip to content

Commit 956f55e

Browse files
committed
Stop using const_void_ptr typedef.
New Cython supports const natively.
1 parent bbe86e7 commit 956f55e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

msgpack/_unpacker.pyx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
from cpython cimport *
55
cdef extern from "Python.h":
6-
ctypedef char* const_void_ptr "const void*"
76
ctypedef struct PyObject
8-
cdef int PyObject_AsReadBuffer(object o, const_void_ptr* buff, Py_ssize_t* buf_len) except -1
7+
cdef int PyObject_AsReadBuffer(object o, const void* buff, Py_ssize_t* buf_len) except -1
98

109
from libc.stdlib cimport *
1110
from libc.string cimport *
@@ -96,7 +95,7 @@ def unpackb(object packed, object object_hook=None, object list_hook=None,
9695
cdef char* cenc = NULL
9796
cdef char* cerr = NULL
9897

99-
PyObject_AsReadBuffer(packed, <const_void_ptr*>&buf, &buf_len)
98+
PyObject_AsReadBuffer(packed, <const void*>&buf, &buf_len)
10099

101100
if encoding is not None:
102101
if isinstance(encoding, unicode):

0 commit comments

Comments
 (0)