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/compile.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/compile.c')
-rw-r--r-- | Python/compile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index 10c94e7..47c57f4 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; |