From b729181a504b6aff2461dcbc07c33e902ee90cb0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 6 Dec 2016 18:45:50 +0100 Subject: Use _PyObject_CallNoArg() Replace: PyObject_CallObject(callable, NULL) with: _PyObject_CallNoArg(callable) --- Parser/tokenizer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Parser/tokenizer.c') diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 0fa3aebc0f..10639ed774 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -440,7 +440,7 @@ fp_readl(char *s, int size, struct tok_state *tok) } else { - bufobj = PyObject_CallObject(tok->decoding_readline, NULL); + bufobj = _PyObject_CallNoArg(tok->decoding_readline); if (bufobj == NULL) goto error; } @@ -533,7 +533,7 @@ fp_setreadl(struct tok_state *tok, const char* enc) Py_XSETREF(tok->decoding_readline, readline); if (pos > 0) { - PyObject *bufobj = PyObject_CallObject(readline, NULL); + PyObject *bufobj = _PyObject_CallNoArg(readline); if (bufobj == NULL) return 0; Py_DECREF(bufobj); @@ -650,7 +650,7 @@ decoding_feof(struct tok_state *tok) } else { PyObject* buf = tok->decoding_buffer; if (buf == NULL) { - buf = PyObject_CallObject(tok->decoding_readline, NULL); + buf = _PyObject_CallNoArg(tok->decoding_readline); if (buf == NULL) { error_ret(tok); return 1; -- cgit v1.2.1