summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2023-08-04 23:24:50 (GMT)
committerGitHub <noreply@github.com>2023-08-04 23:24:50 (GMT)
commit05a824f294f1409f33e32f1799d5b413dcf24445 (patch)
tree173417047763313af6cc1a3c4c54f1d510d28d62 /Python/ceval.c
parentec0a0d2bd9faa247d5b3208a8138e4399b2da890 (diff)
downloadcpython-05a824f294f1409f33e32f1799d5b413dcf24445.zip
cpython-05a824f294f1409f33e32f1799d5b413dcf24445.tar.gz
cpython-05a824f294f1409f33e32f1799d5b413dcf24445.tar.bz2
GH-84436: Skip refcounting for known immortals (GH-107605)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index b85e967..30f722e 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1265,7 +1265,7 @@ initialize_locals(PyThreadState *tstate, PyFunctionObject *func,
if (co->co_flags & CO_VARARGS) {
PyObject *u = NULL;
if (argcount == n) {
- u = Py_NewRef(&_Py_SINGLETON(tuple_empty));
+ u = (PyObject *)&_Py_SINGLETON(tuple_empty);
}
else {
assert(args != NULL);