From 86424e333f1736591114da975c8d2926ba6f51f5 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Dec 2001 02:41:46 +0000 Subject: SF bug #488687 reported by Neal Norwitz The error for assignment to __debug__ used ste->ste_opt_lineno instead of n->n_lineno. The latter was at best incorrect; often the slot was uninitialized. Two fixes here: Use the correct lineno for the error. Initialize ste_opt_lineno in PySymtable_New(); while there are no current cases where it is referenced unless it has already been assigned to, there is no harm in initializing it. --- Python/symtable.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/symtable.c') diff --git a/Python/symtable.c b/Python/symtable.c index 080bfd5aa3..74d2b82c39 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -45,6 +45,7 @@ PySymtableEntry_New(struct symtable *st, char *name, int type, int lineno) ste->ste_children = v; ste->ste_optimized = 0; + ste->ste_opt_lineno = 0; ste->ste_lineno = lineno; switch (type) { case funcdef: -- cgit v1.2.1