gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)

Argument Clinic now uses the new public PyLong_AsInt(), rather than
the old name _PyLong_AsInt().
This commit is contained in:
Victor Stinner 2023-08-25 00:51:22 +02:00 committed by GitHub
parent be800f4be7
commit 4e5a7284ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 467 additions and 466 deletions

View file

@ -99,7 +99,7 @@ builtin___import__(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py
goto skip_optional_pos;
}
}
level = _PyLong_AsInt(args[4]);
level = PyLong_AsInt(args[4]);
if (level == -1 && PyErr_Occurred()) {
goto exit;
}
@ -242,7 +242,7 @@ builtin_chr(PyObject *module, PyObject *arg)
PyObject *return_value = NULL;
int i;
i = _PyLong_AsInt(arg);
i = PyLong_AsInt(arg);
if (i == -1 && PyErr_Occurred()) {
goto exit;
}
@ -342,7 +342,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj
goto skip_optional_pos;
}
if (args[3]) {
flags = _PyLong_AsInt(args[3]);
flags = PyLong_AsInt(args[3]);
if (flags == -1 && PyErr_Occurred()) {
goto exit;
}
@ -360,7 +360,7 @@ builtin_compile(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj
}
}
if (args[5]) {
optimize = _PyLong_AsInt(args[5]);
optimize = PyLong_AsInt(args[5]);
if (optimize == -1 && PyErr_Occurred()) {
goto exit;
}
@ -372,7 +372,7 @@ skip_optional_pos:
if (!noptargs) {
goto skip_optional_kwonly;
}
feature_version = _PyLong_AsInt(args[6]);
feature_version = PyLong_AsInt(args[6]);
if (feature_version == -1 && PyErr_Occurred()) {
goto exit;
}
@ -1212,4 +1212,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=daeee81b018824f4 input=a9049054013a1b77]*/
/*[clinic end generated code: output=bb2da8ccae4190e9 input=a9049054013a1b77]*/