Skip to content

Commit d2fc801

Browse files
committed
Fix warning on 64bit environment.
1 parent f322ed4 commit d2fc801

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

msgpack/unpack.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ static inline int unpack_callback_uint8(unpack_user* u, uint8_t d, msgpack_unpac
5656
static inline int unpack_callback_uint32(unpack_user* u, uint32_t d, msgpack_unpack_object* o)
5757
{
5858
PyObject *p;
59+
#if UINT32_MAX > LONG_MAX
5960
if (d > LONG_MAX) {
6061
p = PyLong_FromUnsignedLong((unsigned long)d);
61-
} else {
62+
} else
63+
#endif
64+
{
6265
p = PyInt_FromLong((long)d);
6366
}
6467
if (!p)

0 commit comments

Comments
 (0)