summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <methane@users.noreply.github.com>2016-07-21 19:32:00 +0900
committerGitHub <noreply@github.com>2016-07-21 19:32:00 +0900
commitb911b3c652e190e6942a610fb3389aaaf2ccf3cc (patch)
tree40eda7cf4d592931a44b8a55a4ab3387e14560b8
parent334dbe2a9652f43abdf27d978d9f4cdaf3f2a34d (diff)
downloadmsgpack-python-b911b3c652e190e6942a610fb3389aaaf2ccf3cc.tar.gz
Fix ext_hook call (#203)
fixes #202
-rw-r--r--msgpack/unpack.h4
-rwxr-xr-xsetup.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/msgpack/unpack.h b/msgpack/unpack.h
index 92f4f11..da2cfb6 100644
--- a/msgpack/unpack.h
+++ b/msgpack/unpack.h
@@ -265,9 +265,9 @@ static inline int unpack_callback_ext(unpack_user* u, const char* base, const ch
}
// length also includes the typecode, so the actual data is length-1
#if PY_MAJOR_VERSION == 2
- py = PyObject_CallFunction(u->ext_hook, "(is#)", typecode, pos, length-1);
+ py = PyObject_CallFunction(u->ext_hook, "(is#)", (int)typecode, pos, (Py_ssize_t)length-1);
#else
- py = PyObject_CallFunction(u->ext_hook, "(iy#)", typecode, pos, length-1);
+ py = PyObject_CallFunction(u->ext_hook, "(iy#)", (int)typecode, pos, (Py_ssize_t)length-1);
#endif
if (!py)
return -1;
diff --git a/setup.py b/setup.py
index 37729bd..1363586 100755
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ except ImportError:
def cythonize(src):
sys.stderr.write("cythonize: %r\n" % (src,))
- cython_compiler.compile([src], cplus=True, emit_linenums=True)
+ cython_compiler.compile([src], cplus=True)
def ensure_source(src):
pyx = os.path.splitext(src)[0] + '.pyx'