diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-06-21 23:03:36 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-06-21 23:03:36 (GMT) |
commit | d9920c255d4a88a70ff9bcfc21f273f5e42fff4e (patch) | |
tree | 981c07dc6aaeaedd31d9b672bc54856d8f7e19e4 /Python/symtable.c | |
parent | f67caf8523341a7a8430c2065d0e6fa7898782da (diff) | |
download | cpython-d9920c255d4a88a70ff9bcfc21f273f5e42fff4e.zip cpython-d9920c255d4a88a70ff9bcfc21f273f5e42fff4e.tar.gz cpython-d9920c255d4a88a70ff9bcfc21f273f5e42fff4e.tar.bz2 |
remove tmpname support since it's no longer used
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index ab5f966..423679e 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -32,7 +32,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, goto fail; ste->ste_table = st; ste->ste_id = k; - ste->ste_tmpname = 0; ste->ste_name = name; Py_INCREF(name); @@ -60,7 +59,6 @@ ste_new(struct symtable *st, identifier name, _Py_block_ty block, ste->ste_varargs = 0; ste->ste_varkeywords = 0; ste->ste_opt_lineno = 0; - ste->ste_tmpname = 0; ste->ste_lineno = lineno; if (st->st_cur != NULL && @@ -204,7 +202,6 @@ symtable_new(void) if ((st->st_symbols = PyDict_New()) == NULL) goto fail; st->st_cur = NULL; - st->st_tmpname = 0; st->st_private = NULL; return st; fail: @@ -995,23 +992,6 @@ error: } static int -symtable_new_tmpname(struct symtable *st) -{ - char tmpname[256]; - identifier tmp; - - PyOS_snprintf(tmpname, sizeof(tmpname), "_[%d]", - ++st->st_cur->ste_tmpname); - tmp = PyString_InternFromString(tmpname); - if (!tmp) - return 0; - if (!symtable_add_def(st, tmp, DEF_LOCAL)) - return 0; - Py_DECREF(tmp); - return 1; -} - -static int symtable_visit_stmt(struct symtable *st, stmt_ty s) { switch (s->kind) { @@ -1184,12 +1164,8 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s) /* nothing to do here */ break; case With_kind: - if (!symtable_new_tmpname(st)) - return 0; VISIT(st, expr, s->v.With.context_expr); if (s->v.With.optional_vars) { - if (!symtable_new_tmpname(st)) - return 0; VISIT(st, expr, s->v.With.optional_vars); } VISIT_SEQ(st, stmt, s->v.With.body); @@ -1237,8 +1213,6 @@ symtable_visit_expr(struct symtable *st, expr_ty e) VISIT_SEQ(st, expr, e->v.Dict.values); break; case ListComp_kind: - if (!symtable_new_tmpname(st)) - return 0; VISIT(st, expr, e->v.ListComp.elt); VISIT_SEQ(st, comprehension, e->v.ListComp.generators); break; |