mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
Drop Python 2 support from _cmsgpack (#376)
This commit is contained in:
parent
b458e9a6a2
commit
891f2d8743
9 changed files with 36 additions and 55 deletions
|
@ -273,11 +273,7 @@ static inline int unpack_callback_ext(unpack_user* u, const char* base, const ch
|
|||
return -1;
|
||||
}
|
||||
// length also includes the typecode, so the actual data is length-1
|
||||
#if PY_MAJOR_VERSION == 2
|
||||
py = PyObject_CallFunction(u->ext_hook, "(is#)", (int)typecode, pos, (Py_ssize_t)length-1);
|
||||
#else
|
||||
py = PyObject_CallFunction(u->ext_hook, "(iy#)", (int)typecode, pos, (Py_ssize_t)length-1);
|
||||
#endif
|
||||
if (!py)
|
||||
return -1;
|
||||
*o = py;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue