summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2023-05-18 21:22:03 (GMT)
committerGitHub <noreply@github.com>2023-05-18 21:22:03 (GMT)
commit0589c6a4d3d822cace42050198cb9a5e99c879ad (patch)
treeae6785cbe277413976d6513d80f42206477d5f0b /Python/compile.c
parentdcdc90d384723920e8dea0ee04eae8c219333634 (diff)
downloadcpython-0589c6a4d3d822cace42050198cb9a5e99c879ad.zip
cpython-0589c6a4d3d822cace42050198cb9a5e99c879ad.tar.gz
cpython-0589c6a4d3d822cace42050198cb9a5e99c879ad.tar.bz2
gh-104615: don't make unsafe swaps in apply_static_swaps (#104620)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 07f8d66..96cd6da 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -7996,7 +7996,7 @@ finally:
}
PyObject *
-_PyCompile_OptimizeCfg(PyObject *instructions, PyObject *consts)
+_PyCompile_OptimizeCfg(PyObject *instructions, PyObject *consts, int nlocals)
{
PyObject *res = NULL;
PyObject *const_cache = PyDict_New();
@@ -8008,7 +8008,7 @@ _PyCompile_OptimizeCfg(PyObject *instructions, PyObject *consts)
if (instructions_to_cfg(instructions, &g) < 0) {
goto error;
}
- int code_flags = 0, nlocals = 0, nparams = 0, firstlineno = 1;
+ int code_flags = 0, nparams = 0, firstlineno = 1;
if (_PyCfg_OptimizeCodeUnit(&g, consts, const_cache, code_flags, nlocals,
nparams, firstlineno) < 0) {
goto error;