aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2021-02-14 15:54:39 +0900
committerGitHub <noreply@github.com>2021-02-14 15:54:39 +0900
commit3cf0833f42ebde24f6435b838785ca4f946b988f (patch)
treeb20aa43c13ea70608adb028bf8cceebe82eb3607
parentbpo-43202: More codeop._maybe_compile clean-ups (GH-24512) (diff)
downloadcpython-3cf0833f42ebde24f6435b838785ca4f946b988f.tar.gz
cpython-3cf0833f42ebde24f6435b838785ca4f946b988f.tar.bz2
cpython-3cf0833f42ebde24f6435b838785ca4f946b988f.zip
bpo-43152: Update assert statement to remove unused warning (GH-24473)
-rw-r--r--Python/ceval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 3b67a6b79bf..9e4c2666ac6 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -4744,8 +4744,7 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals,
Py_DECREF(defaults);
return NULL;
}
- PyCodeObject *code = (PyCodeObject *)_co;
- assert ((code->co_flags & (CO_NEWLOCALS | CO_OPTIMIZED)) == 0);
+ assert ((((PyCodeObject *)_co)->co_flags & (CO_NEWLOCALS | CO_OPTIMIZED)) == 0);
if (locals == NULL) {
locals = globals;
}