Kaydet (Commit) 113da642 authored tarafından Eli Bendersky's avatar Eli Bendersky

Fix windows compilation problems caused by previous commit.

üst 64d11e60
...@@ -1840,6 +1840,8 @@ elementiter_next(ElementIterObject *it) ...@@ -1840,6 +1840,8 @@ elementiter_next(ElementIterObject *it)
* - itertext() also has to handle tail, after finishing with all the * - itertext() also has to handle tail, after finishing with all the
* children of a node. * children of a node.
*/ */
ElementObject *cur_parent;
Py_ssize_t child_index;
while (1) { while (1) {
/* Handle the case reached in the beginning and end of iteration, where /* Handle the case reached in the beginning and end of iteration, where
...@@ -1881,8 +1883,8 @@ elementiter_next(ElementIterObject *it) ...@@ -1881,8 +1883,8 @@ elementiter_next(ElementIterObject *it)
/* See if there are children left to traverse in the current parent. If /* See if there are children left to traverse in the current parent. If
* yes, visit the next child. If not, pop the stack and try again. * yes, visit the next child. If not, pop the stack and try again.
*/ */
ElementObject *cur_parent = it->parent_stack->parent; cur_parent = it->parent_stack->parent;
Py_ssize_t child_index = it->parent_stack->child_index; child_index = it->parent_stack->child_index;
if (cur_parent->extra && child_index < cur_parent->extra->length) { if (cur_parent->extra && child_index < cur_parent->extra->length) {
ElementObject *child = (ElementObject *) ElementObject *child = (ElementObject *)
cur_parent->extra->children[child_index]; cur_parent->extra->children[child_index];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment