summaryrefslogtreecommitdiffstats
path: root/Parser/tokenizer.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/tokenizer.c')
-rw-r--r--Parser/tokenizer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c
index 23ea2eb..d13b438 100644
--- a/Parser/tokenizer.c
+++ b/Parser/tokenizer.c
@@ -463,6 +463,7 @@ fp_setreadl(struct tok_state *tok, const char* enc)
{
PyObject *readline = NULL, *stream = NULL, *io = NULL;
_Py_identifier(open);
+ _Py_identifier(readline);
int fd;
io = PyImport_ImportModuleNoBlock("io");
@@ -481,7 +482,7 @@ fp_setreadl(struct tok_state *tok, const char* enc)
goto cleanup;
Py_XDECREF(tok->decoding_readline);
- readline = PyObject_GetAttrString(stream, "readline");
+ readline = _PyObject_GetAttrId(stream, &PyId_readline);
tok->decoding_readline = readline;
/* The file has been reopened; parsing will restart from