summaryrefslogtreecommitdiff
path: root/msgpack/unpack.h
diff options
context:
space:
mode:
authorINADA Naoki <inada-n@klab.com>2014-08-31 02:29:05 +0900
committerINADA Naoki <inada-n@klab.com>2014-08-31 02:29:05 +0900
commitd6c773dc4d19e4e8bfe2931d8daf251a8b302f25 (patch)
tree33db2982fc23d3f3a5c6e72439839486dc60f436 /msgpack/unpack.h
parent5cfa49bb2c89d6a4dde63d29753624aaca510493 (diff)
downloadmsgpack-python-d6c773dc4d19e4e8bfe2931d8daf251a8b302f25.tar.gz
Fix build and tests.
Diffstat (limited to 'msgpack/unpack.h')
-rw-r--r--msgpack/unpack.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/msgpack/unpack.h b/msgpack/unpack.h
index 71142c6..24045d5 100644
--- a/msgpack/unpack.h
+++ b/msgpack/unpack.h
@@ -55,15 +55,7 @@ static inline int unpack_callback_uint8(unpack_user* u, uint8_t d, msgpack_unpac
static inline int unpack_callback_uint32(unpack_user* u, uint32_t d, msgpack_unpack_object* o)
{
- PyObject *p;
-#if UINT32_MAX > LONG_MAX
- if (d > LONG_MAX) {
- p = PyLong_FromUnsignedLong((unsigned long)d);
- } else
-#endif
- {
- p = PyInt_FromUnsignedLong((long)d);
- }
+ PyObject *p = PyInt_FromSize_t((size_t)d);
if (!p)
return -1;
*o = p;