summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2003-05-21 17:34:50 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2003-05-21 17:34:50 (GMT)
commit4d508adae3101434ae62be1c140e9877673dc257 (patch)
treeb22ceb18bf19afd824be2fda26b89bd7079dca07 /Include
parent6624e6854694315c25981f6bb6cfd360798169c5 (diff)
downloadcpython-4d508adae3101434ae62be1c140e9877673dc257.zip
cpython-4d508adae3101434ae62be1c140e9877673dc257.tar.gz
cpython-4d508adae3101434ae62be1c140e9877673dc257.tar.bz2
Fix for SF [ 734869 ] Lambda functions in list comprehensions
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry. Bugfix candidate.
Diffstat (limited to 'Include')
-rw-r--r--Include/symtable.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/symtable.h b/Include/symtable.h
index 301bd30..d243892 100644
--- a/Include/symtable.h
+++ b/Include/symtable.h
@@ -28,7 +28,6 @@ struct symtable {
int st_nscopes; /* number of scopes */
int st_errors; /* number of errors */
char *st_private; /* name of current class or NULL */
- int st_tmpname; /* temporary name counter */
PyFutureFeatures *st_future; /* module's future features */
};
@@ -47,6 +46,7 @@ typedef struct _symtable_entry {
including free refs to globals */
int ste_generator; /* true if namespace is a generator */
int ste_opt_lineno; /* lineno of last exec or import * */
+ int ste_tmpname; /* temporary name counter */
struct symtable *ste_table;
} PySymtableEntryObject;