summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Modules/_io/stringio.c
diff options
context:
space:
mode:
authorshadchin <[email protected]>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Modules/_io/stringio.c
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Modules/_io/stringio.c')
-rw-r--r--contrib/tools/python3/src/Modules/_io/stringio.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/contrib/tools/python3/src/Modules/_io/stringio.c b/contrib/tools/python3/src/Modules/_io/stringio.c
index 136d80cd3fa..e76152e617b 100644
--- a/contrib/tools/python3/src/Modules/_io/stringio.c
+++ b/contrib/tools/python3/src/Modules/_io/stringio.c
@@ -1,8 +1,8 @@
#define PY_SSIZE_T_CLEAN
#include "Python.h"
-#include <stddef.h> // offsetof()
-#include "pycore_accu.h"
-#include "pycore_object.h"
+#include <stddef.h> // offsetof()
+#include "pycore_accu.h"
+#include "pycore_object.h"
#include "_iomodule.h"
/* Implementation note: the buffer is always at least one character longer
@@ -402,14 +402,14 @@ stringio_iternext(stringio *self)
CHECK_CLOSED(self);
ENSURE_REALIZED(self);
- if (Py_IS_TYPE(self, &PyStringIO_Type)) {
+ if (Py_IS_TYPE(self, &PyStringIO_Type)) {
/* Skip method call overhead for speed */
line = _stringio_readline(self, -1);
}
else {
/* XXX is subclassing StringIO really supported? */
- line = PyObject_CallMethodNoArgs((PyObject *)self,
- _PyIO_str_readline);
+ line = PyObject_CallMethodNoArgs((PyObject *)self,
+ _PyIO_str_readline);
if (line && !PyUnicode_Check(line)) {
PyErr_Format(PyExc_OSError,
"readline() should have returned a str object, "
@@ -714,9 +714,9 @@ _io_StringIO___init___impl(stringio *self, PyObject *value,
}
if (self->readuniversal) {
- self->decoder = PyObject_CallFunctionObjArgs(
+ self->decoder = PyObject_CallFunctionObjArgs(
(PyObject *)&PyIncrementalNewlineDecoder_Type,
- Py_None, self->readtranslate ? Py_True : Py_False, NULL);
+ Py_None, self->readtranslate ? Py_True : Py_False, NULL);
if (self->decoder == NULL)
return -1;
}
@@ -813,7 +813,7 @@ _io_StringIO_seekable_impl(stringio *self)
*/
static PyObject *
-stringio_getstate(stringio *self, PyObject *Py_UNUSED(ignored))
+stringio_getstate(stringio *self, PyObject *Py_UNUSED(ignored))
{
PyObject *initvalue = _io_StringIO_getvalue_impl(self);
PyObject *dict;
@@ -899,7 +899,7 @@ stringio_setstate(stringio *self, PyObject *state)
/* Set carefully the position value. Alternatively, we could use the seek
method instead of modifying self->pos directly to better protect the
- object internal state against erroneous (or malicious) inputs. */
+ object internal state against erroneous (or malicious) inputs. */
position_obj = PyTuple_GET_ITEM(state, 2);
if (!PyLong_Check(position_obj)) {
PyErr_Format(PyExc_TypeError,
@@ -1007,10 +1007,10 @@ PyTypeObject PyStringIO_Type = {
sizeof(stringio), /*tp_basicsize*/
0, /*tp_itemsize*/
(destructor)stringio_dealloc, /*tp_dealloc*/
- 0, /*tp_vectorcall_offset*/
+ 0, /*tp_vectorcall_offset*/
0, /*tp_getattr*/
0, /*tp_setattr*/
- 0, /*tp_as_async*/
+ 0, /*tp_as_async*/
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/