diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-12-04 02:41:46 +0000 |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-12-04 02:41:46 +0000 |
commit | 2d3a353b5c0d2ac98505be9c4ad529d1d889fb41 (patch) | |
tree | 836a3889f34b4de9f9a544d02be7672d4a3bc95a /Python/symtable.c | |
parent | 35648d225e558a81bee34479f5c80bbe071defcf (diff) | |
download | cpython-2d3a353b5c0d2ac98505be9c4ad529d1d889fb41.tar.gz |
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.
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 1 |
1 files changed, 1 insertions, 0 deletions
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: |