summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-11-12 20:39:02 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-11-12 20:39:02 (GMT)
commit3f36a5736b92457273d06cc17d55dd379381873d (patch)
tree81b290f15766d544f0962fed401f52036bf961cc /Modules/_io
parentdcf17f8a553f51fc77d6bb72f4563f625af0d639 (diff)
downloadcpython-3f36a5736b92457273d06cc17d55dd379381873d.zip
cpython-3f36a5736b92457273d06cc17d55dd379381873d.tar.gz
cpython-3f36a5736b92457273d06cc17d55dd379381873d.tar.bz2
Issue #19515: Remove identifiers duplicated in the same file.
Patch written by Andrei Dorian Duma.
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/bufferedio.c1
-rw-r--r--Modules/_io/iobase.c5
2 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 6fe5d58..a04b48d 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -52,7 +52,6 @@ bufferediobase_readinto(PyObject *self, PyObject *args)
Py_buffer buf;
Py_ssize_t len;
PyObject *data;
- _Py_IDENTIFIER(read);
if (!PyArg_ParseTuple(args, "w*:readinto", &buf)) {
return NULL;
diff --git a/Modules/_io/iobase.c b/Modules/_io/iobase.c
index 3da7e5d..1b7cb0f 100644
--- a/Modules/_io/iobase.c
+++ b/Modules/_io/iobase.c
@@ -63,6 +63,8 @@ _Py_IDENTIFIER(__IOBase_closed);
#define IS_CLOSED(self) \
_PyObject_HasAttrId(self, &PyId___IOBase_closed)
+_Py_IDENTIFIER(read);
+
/* Internal methods */
static PyObject *
iobase_unsupported(const char *message)
@@ -180,7 +182,6 @@ static PyObject *
iobase_close(PyObject *self, PyObject *args)
{
PyObject *res;
- _Py_IDENTIFIER(__IOBase_closed);
if (IS_CLOSED(self))
Py_RETURN_NONE;
@@ -454,7 +455,6 @@ iobase_readline(PyObject *self, PyObject *args)
int has_peek = 0;
PyObject *buffer, *result;
Py_ssize_t old_size = -1;
- _Py_IDENTIFIER(read);
_Py_IDENTIFIER(peek);
if (!PyArg_ParseTuple(args, "|O&:readline", &_PyIO_ConvertSsize_t, &limit)) {
@@ -848,7 +848,6 @@ rawiobase_readall(PyObject *self, PyObject *args)
return NULL;
while (1) {
- _Py_IDENTIFIER(read);
PyObject *data = _PyObject_CallMethodId(self, &PyId_read,
"i", DEFAULT_BUFFER_SIZE);
if (!data) {