summaryrefslogtreecommitdiffstats
path: root/Lib/test/clinic.test.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-24 22:51:22 (GMT)
committerGitHub <noreply@github.com>2023-08-24 22:51:22 (GMT)
commit4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8 (patch)
tree31cacab08c7168e0868d6231a70b4a679fffdf58 /Lib/test/clinic.test.c
parentbe800f4be78106d7566c694b3a5652761798db96 (diff)
downloadcpython-4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8.zip
cpython-4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8.tar.gz
cpython-4e5a7284eef4308dce252ca1115d4a5a5b7e6ae8.tar.bz2
gh-108444: Argument Clinic uses PyLong_AsInt() (#108458)
Argument Clinic now uses the new public PyLong_AsInt(), rather than the old name _PyLong_AsInt().
Diffstat (limited to 'Lib/test/clinic.test.c')
-rw-r--r--Lib/test/clinic.test.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/test/clinic.test.c b/Lib/test/clinic.test.c
index 019dc10..2ef7a6e 100644
--- a/Lib/test/clinic.test.c
+++ b/Lib/test/clinic.test.c
@@ -473,7 +473,7 @@ test_bool_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 3) {
goto skip_optional;
}
- c = _PyLong_AsInt(args[2]);
+ c = PyLong_AsInt(args[2]);
if (c == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -486,7 +486,7 @@ exit:
static PyObject *
test_bool_converter_impl(PyObject *module, int a, int b, int c)
-/*[clinic end generated code: output=27f0e653a70b9be3 input=939854fa9f248c60]*/
+/*[clinic end generated code: output=3190e46490de0644 input=939854fa9f248c60]*/
/*[clinic input]
@@ -1009,14 +1009,14 @@ test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 1) {
goto skip_optional;
}
- a = _PyLong_AsInt(args[0]);
+ a = PyLong_AsInt(args[0]);
if (a == -1 && PyErr_Occurred()) {
goto exit;
}
if (nargs < 2) {
goto skip_optional;
}
- b = _PyLong_AsInt(args[1]);
+ b = PyLong_AsInt(args[1]);
if (b == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -1035,7 +1035,7 @@ test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 4) {
goto skip_optional;
}
- d = _PyLong_AsInt(args[3]);
+ d = PyLong_AsInt(args[3]);
if (d == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -1048,7 +1048,7 @@ exit:
static PyObject *
test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d)
-/*[clinic end generated code: output=375eedba5ca9a5b3 input=d20541fc1ca0553e]*/
+/*[clinic end generated code: output=5aed87a7589eefb2 input=d20541fc1ca0553e]*/
/*[clinic input]
@@ -4509,7 +4509,7 @@ Test_cls_with_param(TestObj *self, PyTypeObject *cls, PyObject *const *args, Py_
if (!args) {
goto exit;
}
- a = _PyLong_AsInt(args[0]);
+ a = PyLong_AsInt(args[0]);
if (a == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -4521,7 +4521,7 @@ exit:
static PyObject *
Test_cls_with_param_impl(TestObj *self, PyTypeObject *cls, int a)
-/*[clinic end generated code: output=00218e7f583e6c81 input=af158077bd237ef9]*/
+/*[clinic end generated code: output=d89b99e83d442be0 input=af158077bd237ef9]*/
/*[clinic input]
@@ -4703,7 +4703,7 @@ Test_an_metho_arg_named_arg(TestObj *self, PyObject *arg_)
PyObject *return_value = NULL;
int arg;
- arg = _PyLong_AsInt(arg_);
+ arg = PyLong_AsInt(arg_);
if (arg == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -4715,7 +4715,7 @@ exit:
static PyObject *
Test_an_metho_arg_named_arg_impl(TestObj *self, int arg)
-/*[clinic end generated code: output=7d590626642194ae input=2a53a57cf5624f95]*/
+/*[clinic end generated code: output=9f04de4a62287e28 input=2a53a57cf5624f95]*/
/*[clinic input]
@@ -5062,7 +5062,7 @@ mangled_c_keyword_identifier(PyObject *module, PyObject *const *args, Py_ssize_t
if (!args) {
goto exit;
}
- int_value = _PyLong_AsInt(args[0]);
+ int_value = PyLong_AsInt(args[0]);
if (int_value == -1 && PyErr_Occurred()) {
goto exit;
}
@@ -5074,7 +5074,7 @@ exit:
static PyObject *
mangled_c_keyword_identifier_impl(PyObject *module, int int_value)
-/*[clinic end generated code: output=c049d7d79be26cda input=060876448ab567a2]*/
+/*[clinic end generated code: output=f24b37e0368e0eb8 input=060876448ab567a2]*/
/*[clinic input]