summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 7c44f09..38b4aa4 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -4006,6 +4006,8 @@ dict_keys_inorder(PyObject *dict, int offset)
return NULL;
while (PyDict_Next(dict, &pos, &k, &v)) {
i = PyLong_AS_LONG(v);
+ /* The keys of the dictionary are tuples. (see compiler_add_o)
+ The object we want is always first, though. */
k = PyTuple_GET_ITEM(k, 0);
Py_INCREF(k);
assert((i - offset) < size);
@@ -4029,13 +4031,11 @@ compute_code_flags(struct compiler *c)
flags |= CO_NESTED;
if (ste->ste_generator)
flags |= CO_GENERATOR;
+ if (ste->ste_varargs)
+ flags |= CO_VARARGS;
+ if (ste->ste_varkeywords)
+ flags |= CO_VARKEYWORDS;
}
- if (ste->ste_varargs)
- flags |= CO_VARARGS;
- if (ste->ste_varkeywords)
- flags |= CO_VARKEYWORDS;
- if (ste->ste_generator)
- flags |= CO_GENERATOR;
/* (Only) inherit compilerflags in PyCF_MASK */
flags |= (c->c_flags->cf_flags & PyCF_MASK);