diff options
author | Christian Heimes <christian@cheimes.de> | 2008-02-23 15:01:05 +0000 |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2008-02-23 15:01:05 +0000 |
commit | 5224d28d38eb784f17c2fed3f48368285df6d17a (patch) | |
tree | b258202efc39ae5239d91dcf5b1898c6ce713f16 /Python/symtable.c | |
parent | b12f0b581a6f268d0611c87012d1273aeca220b8 (diff) | |
download | cpython-git-5224d28d38eb784f17c2fed3f48368285df6d17a.tar.gz |
Patch #1759: Backport of PEP 3129 class decorators
with some help from Georg
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index 1e1279a52c..56e187a7d1 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -931,8 +931,8 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s) return 0; if (s->v.FunctionDef.args->defaults) VISIT_SEQ(st, expr, s->v.FunctionDef.args->defaults); - if (s->v.FunctionDef.decorators) - VISIT_SEQ(st, expr, s->v.FunctionDef.decorators); + if (s->v.FunctionDef.decorator_list) + VISIT_SEQ(st, expr, s->v.FunctionDef.decorator_list); if (!symtable_enter_block(st, s->v.FunctionDef.name, FunctionBlock, (void *)s, s->lineno)) return 0; @@ -946,6 +946,8 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s) if (!symtable_add_def(st, s->v.ClassDef.name, DEF_LOCAL)) return 0; VISIT_SEQ(st, expr, s->v.ClassDef.bases); + if (s->v.ClassDef.decorator_list) + VISIT_SEQ(st, expr, s->v.ClassDef.decorator_list); if (!symtable_enter_block(st, s->v.ClassDef.name, ClassBlock, (void *)s, s->lineno)) return 0; |