Skip to content

Commit 4b0097e

Browse files
refactor: remove LONG_MAX check
1 parent 5142b3d commit 4b0097e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

msgpack/unpack.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@ static inline int unpack_callback_uint32(unpack_user* u, uint32_t d, msgpack_unp
7171
static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unpack_object* o)
7272
{
7373
PyObject *p;
74-
if (d > LONG_MAX) {
75-
p = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)d);
76-
} else {
77-
p = PyLong_FromLong((long)d);
78-
}
74+
p = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)d);
7975
if (!p)
8076
return -1;
8177
*o = p;

0 commit comments

Comments
 (0)