mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
67df285a33
commit
afe55bba33
50 changed files with 578 additions and 240 deletions
|
@ -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 *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue