summaryrefslogtreecommitdiff
path: root/msgpack/unpack.h
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2013-10-21 00:29:05 +0900
committerINADA Naoki <inada-n@klab.com>2013-10-21 00:29:05 +0900
commit37c2ad63af8a6e5cb6944f80d931fedbc6b49e7d (patch)
treeeb64d69860be6da6d1cb64c0c24a7347fbb5c4d1 /msgpack/unpack.h
parentcb789596787592f4ec6bf7dcc0c646e8976b3f16 (diff)
downloadmsgpack-python-37c2ad63af8a6e5cb6944f80d931fedbc6b49e7d.tar.gz
Add tests and bugfix.
Diffstat (limited to 'msgpack/unpack.h')
-rw-r--r--msgpack/unpack.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/msgpack/unpack.h b/msgpack/unpack.h
index c733b24..aced40b 100644
--- a/msgpack/unpack.h
+++ b/msgpack/unpack.h
@@ -157,7 +157,7 @@ static inline int unpack_callback_array_item(unpack_user* u, unsigned int curren
static inline int unpack_callback_array_end(unpack_user* u, msgpack_unpack_object* c)
{
if (u->list_hook) {
- PyObject *new_c = PyObject_CallFunction(u->list_hook, "(O)", *c);
+ PyObject *new_c = PyObject_CallFunctionObjArgs(u->list_hook, *c, NULL);
if (!new_c)
return -1;
Py_DECREF(*c);
@@ -203,7 +203,7 @@ static inline int unpack_callback_map_item(unpack_user* u, unsigned int current,
static inline int unpack_callback_map_end(unpack_user* u, msgpack_unpack_object* c)
{
if (u->object_hook) {
- PyObject *new_c = PyObject_CallFunction(u->object_hook, "(O)", *c);
+ PyObject *new_c = PyObject_CallFunctionObjArgs(u->object_hook, *c, NULL);
if (!new_c)
return -1;