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.
This commit is contained in:
Neil Schemenauer 2005-10-23 18:50:36 +00:00
parent 8b528b28f1
commit 2dfcef5c57

View file

@ -445,7 +445,7 @@ check_unoptimized(const PySTEntryObject* ste) {
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;