8000 Fix ext_hook call (#203) · wumingcp-ps/msgpack-python@b911b3c · GitHub
[go: up one dir, main page]

Skip to content

Commit b911b3c

Browse files
authored
Fix ext_hook call (msgpack#203)
fixes msgpack#202
1 parent 334dbe2 commit b911b3c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

msgpack/unpack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ static inline int unpack_callback_ext(unpack_user* u, const char* base, const ch
265265
}
266266
// length also includes the typecode, so the actual data is length-1
267267
#if PY_MAJOR_VERSION == 2
268-
py = PyObject_CallFunction(u->ext_hook, "(is#)", typecode, pos, length-1);
268+
py = PyObject_CallFunction(u->ext_hook, "(is#)", (int)typecode, pos, (Py_ssize_t)length-1);
269269
#else
270-
py = PyObject_CallFunction(u->ext_hook, "(iy#)", typecode, pos, length-1);
270+
py = PyObject_CallFunction(u->ext_hook, "(iy#)", (int)typecode, pos, (Py_ssize_t)length-1);
271271
#endif
272272
if (!py)
273273
return -1;

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class NoCython(Exception):
2020

2121
def cythonize(src):
2222
sys.stderr.write("cythonize: %r\n" % (src,))
23-
cython_compiler.compile([src], cplus=True, emit_linenums=True)
23+
cython_compiler.compile([src], cplus=True)
2424

2525
def ensure_source(src):
2626
pyx = os.path.splitext(src)[0] + '.pyx'

0 commit comments

Comments
 (0)
0