@@ -14,7 +14,7 @@ PYZSTD_FUN_PREFIX(set_c_parameters)(PYZSTD_C_CLASS *self, PyObject *level_or_opt
14
14
15
15
/* Integer compression level */
16
16
if (PyLong_Check (level_or_option )) {
17
- const int level = _PyLong_AsInt (level_or_option );
17
+ const int level = PyLong_AsInt (level_or_option );
18
18
if (level == -1 && PyErr_Occurred ()) {
19
19
PyErr_SetString (PyExc_ValueError ,
20
20
"Compression level should be 32-bit signed int value." );
@@ -52,14 +52,14 @@ PYZSTD_FUN_PREFIX(set_c_parameters)(PYZSTD_C_CLASS *self, PyObject *level_or_opt
52
52
}
53
53
54
54
/* Both key & value should be 32-bit signed int */
55
- const int key_v = _PyLong_AsInt (key );
55
+ const int key_v = PyLong_AsInt (key );
56
56
if (key_v == -1 && PyErr_Occurred ()) {
57
57
PyErr_SetString (PyExc_ValueError ,
58
58
"Key of option dict should be 32-bit signed int value." );
59
59
return -1 ;
60
60
}
61
61
62
- const int value_v = _PyLong_AsInt (value );
62
+ const int value_v = PyLong_AsInt (value );
63
63
if (value_v == -1 && PyErr_Occurred ()) {
64
64
PyErr_SetString (PyExc_ValueError ,
65
65
"Value of option dict should be 32-bit signed int value." );
@@ -125,7 +125,7 @@ PYZSTD_FUN_PREFIX(load_c_dict)(PYZSTD_C_CLASS *self, PyObject *dict)
125
125
return -1 ;
126
126
} else if (ret > 0 ) {
127
127
/* type == -1 may indicate an error. */
128
- type = _PyLong_AsInt (PyTuple_GET_ITEM (dict , 1 ));
128
+ type = PyLong_AsInt (PyTuple_GET_ITEM (dict , 1 ));
129
129
if (type == DICT_TYPE_DIGESTED ||
130
130
type == DICT_TYPE_UNDIGESTED ||
131
131
type == DICT_TYPE_PREFIX )
@@ -206,14 +206,14 @@ PYZSTD_FUN_PREFIX(set_d_parameters)(PYZSTD_D_CLASS *self, PyObject *option)
206
206
}
207
207
208
208
/* Both key & value should be 32-bit signed int */
209
- const int key_v = _PyLong_AsInt (key );
209
+ const int key_v = PyLong_AsInt (key );
210
210
if (key_v == -1 && PyErr_Occurred ()) {
211
211
PyErr_SetString (PyExc_ValueError ,
212
212
"Key of option dict should be 32-bit signed integer value." );
213
213
return -1 ;
214
214
}
215
215
216
- const int value_v = _PyLong_AsInt (value );
216
+ const int value_v = PyLong_AsInt (value );
217
217
if (value_v == -1 && PyErr_Occurred ()) {
218
218
PyErr_SetString (PyExc_ValueError ,
219
219
"Value of option dict should be 32-bit signed integer value." );
@@ -261,7 +261,7 @@ PYZSTD_FUN_PREFIX(load_d_dict)(PYZSTD_D_CLASS *self, PyObject *dict)
261
261
return -1 ;
262
262
} else if (ret > 0 ) {
263
263
/* type == -1 may indicate an error. */
264
- type = _PyLong_AsInt (PyTuple_GET_ITEM (dict , 1 ));
264
+ type = PyLong_AsInt (PyTuple_GET_ITEM (dict , 1 ));
265
265
if (type == DICT_TYPE_DIGESTED ||
266
266
type == DICT_TYPE_UNDIGESTED ||
267
267
type == DICT_TYPE_PREFIX )
0 commit comments