summaryrefslogtreecommitdiffstats
path: root/Modules/_elementtree.c
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-04-04 12:55:07 (GMT)
committerEli Bendersky <eliben@gmail.com>2012-04-04 12:55:07 (GMT)
commit08b852970e6aae818a7fb398abcf8135fe19ec3a (patch)
treec63dab76db9d1dbb3c2543d56423f5269426381d /Modules/_elementtree.c
parentda80b1eb2fa5db8a388fa202e6aada686d243842 (diff)
downloadcpython-08b852970e6aae818a7fb398abcf8135fe19ec3a.zip
cpython-08b852970e6aae818a7fb398abcf8135fe19ec3a.tar.gz
cpython-08b852970e6aae818a7fb398abcf8135fe19ec3a.tar.bz2
Fix Windows compilation errors
Diffstat (limited to 'Modules/_elementtree.c')
-rw-r--r--Modules/_elementtree.c6
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]);