mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-11-08 05:21:01 +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)
|
static inline int unpack_callback_uint32(unpack_user* u, uint32_t d, msgpack_unpack_object* o)
|
||||||
{
|
{
|
||||||
PyObject *p;
|
PyObject *p;
|
||||||
|
#if UINT32_MAX > LONG_MAX
|
||||||
if (d > LONG_MAX) {
|
if (d > LONG_MAX) {
|
||||||
p = PyLong_FromUnsignedLong((unsigned long)d);
|
p = PyLong_FromUnsignedLong((unsigned long)d);
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
p = PyInt_FromLong((long)d);
|
p = PyInt_FromLong((long)d);
|
||||||
}
|
}
|
||||||
if (!p)
|
if (!p)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue