From 2dfcef5c57f35af0e1ba200ba36508be8667001a Mon Sep 17 00:00:00 2001 From: Neil Schemenauer Date: Sun, 23 Oct 2005 18:50:36 +0000 Subject: 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. --- Python/symtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/symtable.c b/Python/symtable.c index cbf0344..46efe4b 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -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; -- cgit v0.12