summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-22 11:49:13 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-22 11:49:13 (GMT)
commit0811c5d7ba43574d746599c97696e6297382d101 (patch)
tree71d541b4e8f402b4dd1b18615000b41c3e21296c /Python/compile.c
parent3f1701a1fb45743a97205375e0e209c1d6bb6587 (diff)
parentb7666a30933efbbb2e400e6916bba2311340fcd1 (diff)
downloadcpython-0811c5d7ba43574d746599c97696e6297382d101.zip
cpython-0811c5d7ba43574d746599c97696e6297382d101.tar.gz
cpython-0811c5d7ba43574d746599c97696e6297382d101.tar.bz2
Merge 3.5 (Issue #24619)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index ce2b8d6..cb36d57 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1749,13 +1749,12 @@ compiler_function(struct compiler *c, stmt_ty s, int is_async)
arglength = asdl_seq_LEN(args->defaults);
arglength |= kw_default_count << 8;
arglength |= num_annotations << 16;
+ if (is_async)
+ co->co_flags |= CO_COROUTINE;
compiler_make_closure(c, co, arglength, qualname);
Py_DECREF(qualname);
Py_DECREF(co);
- if (is_async)
- co->co_flags |= CO_COROUTINE;
-
/* decorators */
for (i = 0; i < asdl_seq_LEN(decos); i++) {
ADDOP_I(c, CALL_FUNCTION, 1);