From b7666a30933efbbb2e400e6916bba2311340fcd1 Mon Sep 17 00:00:00 2001 From: Yury Selivanov Date: Wed, 22 Jul 2015 14:48:57 +0300 Subject: Issue #24619: More tests; fix nits in compiler.c --- Python/compile.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 2202e8f3a1c..33cc8c22cb8 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); -- cgit v1.2.3