Mercurial > cpython-lru_cache-weakref
diff Python/symtable.c @ 35780:72cb041ccde3 legacy-trunk
Fix check_unoptimized() function. The only optimized namespaces are
in function blocks. This elimiates spurious warnings about "import *" and
related statements at the class level.
| author | Neil Schemenauer <nascheme@enme.ucalgary.ca> |
|---|---|
| date | Sun, 23 Oct 2005 18:50:36 +0000 |
| parents | 19d796bd740f |
| children | 914ec0afa51c |
line wrap: on
line diff
--- a/Python/symtable.c Sun Oct 23 18:37:42 2005 +0000 +++ b/Python/symtable.c Sun Oct 23 18:50:36 2005 +0000 @@ -445,7 +445,7 @@ char buf[300]; const char* trailer; - if (ste->ste_type == ModuleBlock || !ste->ste_unoptimized + if (ste->ste_type != FunctionBlock || !ste->ste_unoptimized || !(ste->ste_free || ste->ste_child_free)) return 1;
