diff options
author | Eli Bendersky <eliben@gmail.com> | 2012-04-04 12:55:07 (GMT) |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2012-04-04 12:55:07 (GMT) |
commit | 08b852970e6aae818a7fb398abcf8135fe19ec3a (patch) | |
tree | c63dab76db9d1dbb3c2543d56423f5269426381d /Modules | |
parent | da80b1eb2fa5db8a388fa202e6aada686d243842 (diff) | |
download | cpython-08b852970e6aae818a7fb398abcf8135fe19ec3a.zip cpython-08b852970e6aae818a7fb398abcf8135fe19ec3a.tar.gz cpython-08b852970e6aae818a7fb398abcf8135fe19ec3a.tar.bz2 |
Fix Windows compilation errors
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_elementtree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c index 5425269..c5bbc80 100644 --- a/Modules/_elementtree.c +++ b/Modules/_elementtree.c @@ -264,17 +264,19 @@ create_extra(ElementObject* self, PyObject* attrib) LOCAL(void) dealloc_extra(ElementObject* self) { + ElementObjectExtra *myextra; + int i; + if (!self->extra) return; /* Avoid DECREFs calling into this code again (cycles, etc.) */ - ElementObjectExtra *myextra = self->extra; + myextra = self->extra; self->extra = NULL; Py_DECREF(myextra->attrib); - int i; for (i = 0; i < myextra->length; i++) Py_DECREF(myextra->children[i]); |