mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-19 20:03:16 +00:00
Fix warning on 64bit environment.
This commit is contained in:
parent
f322ed4e1b
commit
d2fc801034
1 changed files with 4 additions and 1 deletions
|
@ -56,9 +56,12 @@ 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 {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
p = PyInt_FromLong((long)d);
|
||||
}
|
||||
if (!p)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue