@@ -47,7 +47,7 @@ static inline msgpack_unpack_object unpack_callback_root(unpack_user* u)
47
47
48
48
static inline int unpack_callback_uint16 (unpack_user * u , uint16_t d , msgpack_unpack_object * o )
49
49
{
50
- PyObject * p = PyInt_FromLong ((long )d );
50
+ PyObject * p = PyLong_FromLong ((long )d );
51
51
if (!p )
52
52
return -1 ;
53
53
* o = p ;
@@ -61,7 +61,7 @@ static inline int unpack_callback_uint8(unpack_user* u, uint8_t d, msgpack_unpac
61
61
62
62
static inline int unpack_callback_uint32 (unpack_user * u , uint32_t d , msgpack_unpack_object * o )
63
63
{
64
- PyObject * p = PyInt_FromSize_t ((size_t )d );
64
+ PyObject * p = PyLong_FromSize_t ((size_t )d );
65
65
if (!p )
66
66
return -1 ;
67
67
* o = p ;
@@ -74,7 +74,7 @@ static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unp
74
74
if (d > LONG_MAX ) {
75
75
p = PyLong_FromUnsignedLongLong ((unsigned PY_LONG_LONG )d );
76
76
} else {
77
- p = PyInt_FromLong ((long )d );
77
+ p = PyLong_FromLong ((long )d );
78
78
}
79
79
if (!p )
80
80
return -1 ;
@@ -84,7 +84,7 @@ static inline int unpack_callback_uint64(unpack_user* u, uint64_t d, msgpack_unp
84
84
85
85
static inline int unpack_callback_int32 (unpack_user * u , int32_t d , msgpack_unpack_object * o )
86
86
{
87
- PyObject * p = PyInt_FromLong (d );
87
+ PyObject * p = PyLong_FromLong (d );
88
88
if (!p )
89
89
return -1 ;
90
90
* o = p ;
@@ -107,7 +107,7 @@ static inline int unpack_callback_int64(unpack_user* u, int64_t d, msgpack_unpac
107
107
if (d > LONG_MAX || d < LONG_MIN ) {
108
108
p = PyLong_FromLongLong ((PY_LONG_LONG )d );
109
109
} else {
110
- p = PyInt_FromLong ((long )d );
110
+ p = PyLong_FromLong ((long )d );
111
111
}
112
112
* o = p ;
113
113
return 0 ;
0 commit comments