Mercurial > cpython-lru_cache-weakref
diff Python/symtable.c @ 35759:d91ed7107fd2 legacy-trunk
ANSI-C-ify the placement of local var declarations.
| author | Armin Rigo <arigo@tunes.org> |
|---|---|
| date | Fri, 21 Oct 2005 12:57:31 +0000 |
| parents | 1c4d192f1568 |
| children | 34ef9f138c30 |
line wrap: on
line diff
--- a/Python/symtable.c Fri Oct 21 11:45:01 2005 +0000 +++ b/Python/symtable.c Fri Oct 21 12:57:31 2005 +0000 @@ -444,12 +444,13 @@ static int check_unoptimized(const PySTEntryObject* ste) { char buf[300]; + const char* trailer; if (ste->ste_type == ModuleBlock || !ste->ste_unoptimized || !(ste->ste_free || ste->ste_child_free)) return 1; - const char* trailer = (ste->ste_child_free ? + trailer = (ste->ste_child_free ? "contains a nested function with free variables" : "is a nested function"); @@ -621,8 +622,9 @@ /* Recursively call analyze_block() on each child block */ for (i = 0; i < PyList_GET_SIZE(ste->ste_children); ++i) { PyObject *c = PyList_GET_ITEM(ste->ste_children, i); + PySTEntryObject* entry; assert(c && PySTEntry_Check(c)); - PySTEntryObject* entry = (PySTEntryObject*)c; + entry = (PySTEntryObject*)c; if (!analyze_block(entry, newbound, newfree, newglobal)) goto error; if (entry->ste_free || entry->ste_child_free)
