summaryrefslogtreecommitdiffstats
path: root/Objects/clinic/longobject.c.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-06-01 23:31:58 (GMT)
committerGitHub <noreply@github.com>2023-06-01 23:31:58 (GMT)
commitcbb9ba844f15f2b8127028e6dfd4681b2cb2376f (patch)
treee80117a8aa3fd5a6e2d13a3295a9d908c6cc5fa5 /Objects/clinic/longobject.c.h
parent146939306adcff706ebddb047f7470d148125cdf (diff)
downloadcpython-cbb9ba844f15f2b8127028e6dfd4681b2cb2376f.zip
cpython-cbb9ba844f15f2b8127028e6dfd4681b2cb2376f.tar.gz
cpython-cbb9ba844f15f2b8127028e6dfd4681b2cb2376f.tar.bz2
gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)
Since Python 3.12, PyUnicode_READY() does nothing and always returns 0. Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).
Diffstat (limited to 'Objects/clinic/longobject.c.h')
-rw-r--r--Objects/clinic/longobject.c.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h
index c26ceaf..d37e44f 100644
--- a/Objects/clinic/longobject.c.h
+++ b/Objects/clinic/longobject.c.h
@@ -107,9 +107,6 @@ int___format__(PyObject *self, PyObject *arg)
_PyArg_BadArgument("__format__", "argument", "str", arg);
goto exit;
}
- if (PyUnicode_READY(arg) == -1) {
- goto exit;
- }
format_spec = arg;
return_value = int___format___impl(self, format_spec);
@@ -346,9 +343,6 @@ int_to_bytes(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *
_PyArg_BadArgument("to_bytes", "argument 'byteorder'", "str", args[1]);
goto exit;
}
- if (PyUnicode_READY(args[1]) == -1) {
- goto exit;
- }
byteorder = args[1];
if (!--noptargs) {
goto skip_optional_pos;
@@ -444,9 +438,6 @@ int_from_bytes(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs, PyOb
_PyArg_BadArgument("from_bytes", "argument 'byteorder'", "str", args[1]);
goto exit;
}
- if (PyUnicode_READY(args[1]) == -1) {
- goto exit;
- }
byteorder = args[1];
if (!--noptargs) {
goto skip_optional_pos;
@@ -484,4 +475,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return int_is_integer_impl(self);
}
-/*[clinic end generated code: output=cfdf35d916158d4f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=75ed306fff493ba1 input=a9049054013a1b77]*/