diff options
author | INADA Naoki <songofacandy@gmail.com> | 2015-11-09 01:50:40 +0900 |
---|---|---|
committer | INADA Naoki <songofacandy@gmail.com> | 2015-11-09 01:52:37 +0900 |
commit | de3c2b99f78d134c326bc375f19f54b7c851797a (patch) | |
tree | 08068155966b4ef3cb3e68c4a9ed122c626a0ab5 /msgpack/unpack.h | |
parent | 3cef27b69b250f9abf126c85578a821c2d21e72e (diff) | |
download | msgpack-python-de3c2b99f78d134c326bc375f19f54b7c851797a.tar.gz |
refactor C code
fixes #137
Diffstat (limited to 'msgpack/unpack.h')
-rw-r--r-- | msgpack/unpack.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/msgpack/unpack.h b/msgpack/unpack.h index 297bc93..92f4f11 100644 --- a/msgpack/unpack.h +++ b/msgpack/unpack.h @@ -69,7 +69,7 @@ static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unp if (d > LONG_MAX) { p = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)d); } else { - p = PyInt_FromSize_t((size_t)d); + p = PyInt_FromLong((long)d); } if (!p) return -1; @@ -100,7 +100,7 @@ static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpac { PyObject *p; if (d > LONG_MAX || d < LONG_MIN) { - p = PyLong_FromLongLong((unsigned PY_LONG_LONG)d); + p = PyLong_FromLongLong((PY_LONG_LONG)d); } else { p = PyInt_FromLong((long)d); } |