Rename _Py_identifier to _Py_IDENTIFIER.

This commit is contained in:
Martin v. Löwis 2011-10-14 10:20:37 +02:00
parent 01277d166a
commit bd928fef42
57 changed files with 262 additions and 262 deletions

View file

@ -225,8 +225,8 @@ io_open(PyObject *self, PyObject *args, PyObject *kwds)
PyObject *raw, *modeobj = NULL, *buffer = NULL, *wrapper = NULL;
_Py_identifier(isatty);
_Py_identifier(fileno);
_Py_IDENTIFIER(isatty);
_Py_IDENTIFIER(fileno);
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|sizzzi:open", kwlist,
&file, &mode, &buffering,

View file

@ -13,17 +13,17 @@
#include "pythread.h"
#include "_iomodule.h"
_Py_identifier(close);
_Py_identifier(_dealloc_warn);
_Py_identifier(flush);
_Py_identifier(isatty);
_Py_identifier(peek);
_Py_identifier(read);
_Py_identifier(read1);
_Py_identifier(readable);
_Py_identifier(readinto);
_Py_identifier(writable);
_Py_identifier(write);
_Py_IDENTIFIER(close);
_Py_IDENTIFIER(_dealloc_warn);
_Py_IDENTIFIER(flush);
_Py_IDENTIFIER(isatty);
_Py_IDENTIFIER(peek);
_Py_IDENTIFIER(read);
_Py_IDENTIFIER(read1);
_Py_IDENTIFIER(readable);
_Py_IDENTIFIER(readinto);
_Py_IDENTIFIER(writable);
_Py_IDENTIFIER(write);
/*
* BufferedIOBase class, inherits from IOBase.
@ -50,7 +50,7 @@ bufferediobase_readinto(PyObject *self, PyObject *args)
Py_buffer buf;
Py_ssize_t len;
PyObject *data;
_Py_identifier(read);
_Py_IDENTIFIER(read);
if (!PyArg_ParseTuple(args, "w*:readinto", &buf)) {
return NULL;

View file

@ -122,7 +122,7 @@ internal_close(fileio *self)
static PyObject *
fileio_close(fileio *self)
{
_Py_identifier(close);
_Py_IDENTIFIER(close);
if (!self->closefd) {
self->fd = -1;
Py_RETURN_NONE;

View file

@ -97,7 +97,7 @@ PyDoc_STRVAR(iobase_tell_doc,
static PyObject *
iobase_tell(PyObject *self, PyObject *args)
{
_Py_identifier(seek);
_Py_IDENTIFIER(seek);
return _PyObject_CallMethodId(self, &PyId_seek, "ii", 0, 1);
}
@ -466,7 +466,7 @@ iobase_readline(PyObject *self, PyObject *args)
int has_peek = 0;
PyObject *buffer, *result;
Py_ssize_t old_size = -1;
_Py_identifier(read);
_Py_IDENTIFIER(read);
if (!PyArg_ParseTuple(args, "|O&:readline", &_PyIO_ConvertSsize_t, &limit)) {
return NULL;
@ -484,7 +484,7 @@ iobase_readline(PyObject *self, PyObject *args)
PyObject *b;
if (has_peek) {
_Py_identifier(peek);
_Py_IDENTIFIER(peek);
PyObject *readahead = _PyObject_CallMethodId(self, &PyId_peek, "i", 1);
if (readahead == NULL)
@ -606,7 +606,7 @@ iobase_readlines(PyObject *self, PyObject *args)
/* XXX special-casing this made sense in the Python version in order
to remove the bytecode interpretation overhead, but it could
probably be removed here. */
_Py_identifier(extend);
_Py_IDENTIFIER(extend);
PyObject *ret = _PyObject_CallMethodId(result, &PyId_extend, "O", self);
if (ret == NULL) {
@ -789,7 +789,7 @@ rawiobase_read(PyObject *self, PyObject *args)
}
if (n < 0) {
_Py_identifier(readall);
_Py_IDENTIFIER(readall);
return _PyObject_CallMethodId(self, &PyId_readall, NULL);
}
@ -833,7 +833,7 @@ rawiobase_readall(PyObject *self, PyObject *args)
return NULL;
while (1) {
_Py_identifier(read);
_Py_IDENTIFIER(read);
PyObject *data = _PyObject_CallMethodId(self, &PyId_read,
"i", DEFAULT_BUFFER_SIZE);
if (!data) {

View file

@ -11,23 +11,23 @@
#include "structmember.h"
#include "_iomodule.h"
_Py_identifier(close);
_Py_identifier(_dealloc_warn);
_Py_identifier(decode);
_Py_identifier(device_encoding);
_Py_identifier(fileno);
_Py_identifier(flush);
_Py_identifier(getpreferredencoding);
_Py_identifier(isatty);
_Py_identifier(read);
_Py_identifier(readable);
_Py_identifier(replace);
_Py_identifier(reset);
_Py_identifier(seek);
_Py_identifier(seekable);
_Py_identifier(setstate);
_Py_identifier(tell);
_Py_identifier(writable);
_Py_IDENTIFIER(close);
_Py_IDENTIFIER(_dealloc_warn);
_Py_IDENTIFIER(decode);
_Py_IDENTIFIER(device_encoding);
_Py_IDENTIFIER(fileno);
_Py_IDENTIFIER(flush);
_Py_IDENTIFIER(getpreferredencoding);
_Py_IDENTIFIER(isatty);
_Py_IDENTIFIER(read);
_Py_IDENTIFIER(readable);
_Py_IDENTIFIER(replace);
_Py_IDENTIFIER(reset);
_Py_IDENTIFIER(seek);
_Py_IDENTIFIER(seekable);
_Py_IDENTIFIER(setstate);
_Py_IDENTIFIER(tell);
_Py_IDENTIFIER(writable);
/* TextIOBase */