mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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:
parent
8b528b28f1
commit
2dfcef5c57
1 changed files with 1 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ check_unoptimized(const PySTEntryObject* ste) {
|
||||||
char buf[300];
|
char buf[300];
|
||||||
const char* trailer;
|
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))
|
|| !(ste->ste_free || ste->ste_child_free))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue