mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-06-19 06:02:09 +00:00
Simplify PyObject creation in unpack_callback_int64
Refactor unpack_callback_int64 to simplify PyObject creation.
This commit is contained in:
parent
1e28db75ba
commit
77f5a53834
1 changed files with 0 additions and 5 deletions
|
|
@ -98,11 +98,6 @@ static inline int unpack_callback_int8(unpack_user* u, int8_t d, msgpack_unpack_
|
|||
|
||||
static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpack_object* o)
|
||||
{
|
||||
PyObject *p;
|
||||
if (d > LONG_MAX || d < LONG_MIN) {
|
||||
p = PyLong_FromLongLong((PY_LONG_LONG)d);
|
||||
} else {
|
||||
p = PyLong_FromLong((long)d);
|
||||
PyObject *p = PyLong_FromLongLong((PY_LONG_LONG)d);
|
||||
if (!p)
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue