Skip to content

Commit 77f5a53

Browse files
authored
Simplify PyObject creation in unpack_callback_int64
Refactor unpack_callback_int64 to simplify PyObject creation.
1 parent 1e28db7 commit 77f5a53

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

msgpack/unpack.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,6 @@ static inline int unpack_callback_int8(unpack_user* u, int8_t d, msgpack_unpack_
9898

9999
static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpack_object* o)
100100
{
101-
PyObject *p;
102-
if (d > LONG_MAX || d < LONG_MIN) {
103-
p = PyLong_FromLongLong((PY_LONG_LONG)d);
104-
} else {
105-
p = PyLong_FromLong((long)d);
106101
PyObject *p = PyLong_FromLongLong((PY_LONG_LONG)d);
107102
if (!p)
108103
return -1;

0 commit comments

Comments
 (0)