From 31441302171fe882976bcc05f5ded9645cd690af Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Fri, 21 Oct 2005 12:57:31 +0000 Subject: ANSI-C-ify the placement of local var declarations. --- Python/compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 10c94e7fc0f..47c57f48e18 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2329,8 +2329,9 @@ compiler_import_as(struct compiler *c, identifier name, identifier asname) src = dot + 1; while (dot) { /* NB src is only defined when dot != NULL */ + PyObject *attr; dot = strchr(src, '.'); - PyObject *attr = PyString_FromStringAndSize(src, + attr = PyString_FromStringAndSize(src, dot ? dot - src : strlen(src)); ADDOP_O(c, LOAD_ATTR, attr, names); src = dot + 1; -- cgit v1.2.3