Add API for static strings, primarily good for identifiers.

Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
This commit is contained in:
Martin v. Löwis 2011-10-09 10:38:36 +02:00
parent 67df285a33
commit afe55bba33
50 changed files with 578 additions and 240 deletions

View file

@ -128,6 +128,7 @@ internal_close(fileio *self)
static PyObject *
fileio_close(fileio *self)
{
_Py_identifier(close);
if (!self->closefd) {
self->fd = -1;
Py_RETURN_NONE;
@ -143,8 +144,8 @@ fileio_close(fileio *self)
if (errno < 0)
return NULL;
return PyObject_CallMethod((PyObject*)&PyRawIOBase_Type,
"close", "O", self);
return _PyObject_CallMethodId((PyObject*)&PyRawIOBase_Type,
&PyId_close, "O", self);
}
static PyObject *