10000 Fix ext_hook call by methane · Pull Request #203 · msgpack/msgpack-python · GitHub
[go: up one dir, main page]

Skip to content

Fix ext_hook call #203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix ext_hook call
fixes #202
  • Loading branch information
methane committed Jul 21, 2016
commit 0ee18045c769ef43b4ee2d279d02b8be8a6f6f69
4 changes: 2 additions & 2 deletions msgpack/unpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class NoCython(Exception):

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'
Expand Down
0