diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-30 01:05:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-30 01:05:01 (GMT) |
commit | 8c5f74fc89e35827c52753fe620b32207d537319 (patch) | |
tree | 62a1eba40b01250e97f2c5cd263456b4cb7e734a /Parser/pegen.c | |
parent | e7bc8d16364bde54487eab349a29d58345e35f28 (diff) | |
download | cpython-8c5f74fc89e35827c52753fe620b32207d537319.zip cpython-8c5f74fc89e35827c52753fe620b32207d537319.tar.gz cpython-8c5f74fc89e35827c52753fe620b32207d537319.tar.bz2 |
gh-106023: Update code using _PyObject_FastCall() (#106257)
Replace _PyObject_FastCall() calls with PyObject_Vectorcall().
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r-- | Parser/pegen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c index b9894dd..885d423 100644 --- a/Parser/pegen.c +++ b/Parser/pegen.c @@ -465,7 +465,6 @@ _PyPegen_new_identifier(Parser *p, const char *n) identifier; if so, normalize to NFKC. */ if (!PyUnicode_IS_ASCII(id)) { - PyObject *id2; if (!init_normalization(p)) { Py_DECREF(id); @@ -478,12 +477,13 @@ _PyPegen_new_identifier(Parser *p, const char *n) goto error; } PyObject *args[2] = {form, id}; - id2 = _PyObject_FastCall(p->normalize, args, 2); + PyObject *id2 = PyObject_Vectorcall(p->normalize, args, 2, NULL); Py_DECREF(id); Py_DECREF(form); if (!id2) { goto error; } + if (!PyUnicode_Check(id2)) { PyErr_Format(PyExc_TypeError, |