diff options
author | Armin Rigo <arigo@tunes.org> | 2005-10-21 12:57:31 (GMT) |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2005-10-21 12:57:31 (GMT) |
commit | 31441302171fe882976bcc05f5ded9645cd690af (patch) | |
tree | 7f9b06b9c60478f0fb7f59871a88969237f8c19e /Python/symtable.c | |
parent | b2308bb9be492937764a99007f5fd49b75fbefee (diff) | |
download | cpython-31441302171fe882976bcc05f5ded9645cd690af.zip cpython-31441302171fe882976bcc05f5ded9645cd690af.tar.gz cpython-31441302171fe882976bcc05f5ded9645cd690af.tar.bz2 |
ANSI-C-ify the placement of local var declarations.
Diffstat (limited to 'Python/symtable.c')
-rw-r--r-- | Python/symtable.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c index bd41202..7af1390 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -444,12 +444,13 @@ analyze_cells(PyObject *scope, PyObject *free) 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 @@ analyze_block(PySTEntryObject *ste, PyObject *bound, PyObject *free, /* 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) |