@@ -47,7 +47,7 @@ static inline msgpack_unpack_object unpack_callback_root(unpack_user* u)
4747
4848static inline int unpack_callback_uint16 (unpack_user * u , uint16_t d , msgpack_unpack_object * o )
4949{
50- PyObject * p = PyInt_FromLong ((long )d );
50+ PyObject * p = PyLong_FromLong ((long )d );
5151 if (!p )
5252 return -1 ;
5353 * o = p ;
@@ -61,7 +61,7 @@ static inline int unpack_callback_uint8(unpack_user* u, uint8_t d, msgpack_unpac
6161
6262static inline int unpack_callback_uint32 (unpack_user * u , uint32_t d , msgpack_unpack_object * o )
6363{
64- PyObject * p = PyInt_FromSize_t ((size_t )d );
64+ PyObject * p = PyLong_FromSize_t ((size_t )d );
6565 if (!p )
6666 return -1 ;
6767 * o = p ;
@@ -74,7 +74,7 @@ static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unp
7474 if (d > LONG_MAX ) {
7575 p = PyLong_FromUnsignedLongLong ((unsigned PY_LONG_LONG )d );
7676 } else {
77- p = PyInt_FromLong ((long )d );
77+ p = PyLong_FromLong ((long )d );
7878 }
7979 if (!p )
8080 return -1 ;
@@ -84,7 +84,7 @@ static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unp
8484
8585static inline int unpack_callback_int32 (unpack_user * u , int32_t d , msgpack_unpack_object * o )
8686{
87- PyObject * p = PyInt_FromLong (d );
87+ PyObject * p = PyLong_FromLong (d );
8888 if (!p )
8989 return -1 ;
9090 * o = p ;
@@ -107,7 +107,7 @@ static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpac
107107 if (d > LONG_MAX || d < LONG_MIN ) {
108108 p = PyLong_FromLongLong ((PY_LONG_LONG )d );
109109 } else {
110- p = PyInt_FromLong ((long )d );
110+ p = PyLong_FromLong ((long )d );
111111 }
112112 * o = p ;
113113 return 0 ;
0 commit comments