aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-04-18 12:39:32 +0300
committershadchin <shadchin@yandex-team.ru>2022-04-18 12:39:32 +0300
commitd4be68e361f4258cf0848fc70018dfe37a2acc24 (patch)
tree153e294cd97ac8b5d7a989612704a0c1f58e8ad4 /contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h
parent260c02f5ccf242d9d9b8a873afaf6588c00237d6 (diff)
downloadydb-d4be68e361f4258cf0848fc70018dfe37a2acc24.tar.gz
IGNIETFERRO-1816 Update Python 3 from 3.9.12 to 3.10.4
ref:9f96be6d02ee8044fdd6f124b799b270c20ce641
Diffstat (limited to 'contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h')
-rw-r--r--contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h49
1 files changed, 7 insertions, 42 deletions
diff --git a/contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h b/contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h
index 56d6332a25..19543fdf79 100644
--- a/contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h
+++ b/contrib/tools/python3/src/Modules/_io/clinic/bufferedio.c.h
@@ -120,14 +120,9 @@ _io__Buffered_peek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 1) {
goto skip_optional;
}
- if (PyFloat_Check(args[0])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
{
Py_ssize_t ival = -1;
- PyObject *iobj = PyNumber_Index(args[0]);
+ PyObject *iobj = _PyNumber_Index(args[0]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
@@ -200,14 +195,9 @@ _io__Buffered_read1(buffered *self, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 1) {
goto skip_optional;
}
- if (PyFloat_Check(args[0])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
{
Py_ssize_t ival = -1;
- PyObject *iobj = PyNumber_Index(args[0]);
+ PyObject *iobj = _PyNumber_Index(args[0]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
@@ -356,11 +346,6 @@ _io__Buffered_seek(buffered *self, PyObject *const *args, Py_ssize_t nargs)
if (nargs < 2) {
goto skip_optional;
}
- if (PyFloat_Check(args[1])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
whence = _PyLong_AsInt(args[1]);
if (whence == -1 && PyErr_Occurred()) {
goto exit;
@@ -434,14 +419,9 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs)
if (!noptargs) {
goto skip_optional_pos;
}
- if (PyFloat_Check(fastargs[1])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
{
Py_ssize_t ival = -1;
- PyObject *iobj = PyNumber_Index(fastargs[1]);
+ PyObject *iobj = _PyNumber_Index(fastargs[1]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
@@ -493,14 +473,9 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs)
if (!noptargs) {
goto skip_optional_pos;
}
- if (PyFloat_Check(fastargs[1])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
{
Py_ssize_t ival = -1;
- PyObject *iobj = PyNumber_Index(fastargs[1]);
+ PyObject *iobj = _PyNumber_Index(fastargs[1]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
@@ -590,14 +565,9 @@ _io_BufferedRWPair___init__(PyObject *self, PyObject *args, PyObject *kwargs)
if (PyTuple_GET_SIZE(args) < 3) {
goto skip_optional;
}
- if (PyFloat_Check(PyTuple_GET_ITEM(args, 2))) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
{
Py_ssize_t ival = -1;
- PyObject *iobj = PyNumber_Index(PyTuple_GET_ITEM(args, 2));
+ PyObject *iobj = _PyNumber_Index(PyTuple_GET_ITEM(args, 2));
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
@@ -649,14 +619,9 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
if (!noptargs) {
goto skip_optional_pos;
}
- if (PyFloat_Check(fastargs[1])) {
- PyErr_SetString(PyExc_TypeError,
- "integer argument expected, got float" );
- goto exit;
- }
{
Py_ssize_t ival = -1;
- PyObject *iobj = PyNumber_Index(fastargs[1]);
+ PyObject *iobj = _PyNumber_Index(fastargs[1]);
if (iobj != NULL) {
ival = PyLong_AsSsize_t(iobj);
Py_DECREF(iobj);
@@ -672,4 +637,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=7d9ad40c95bdd808 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=98ccf7610c0e82ba input=a9049054013a1b77]*/