Commit 0e8d18f8 by Alexander Bertsch Committed by Victor M. Alvarez

Adding iterator reset for Rules iteration (#59)

When iterating over a Rules object, the iteration would work for a
single pass before throwing a StopIteration exception. This slightly
changes the iteration logic to reset to the iteration list head after
a full iteration has been completed.
parent b53ffc85
......@@ -1278,6 +1278,7 @@ static PyObject* Rules_next(
if (RULE_IS_NULL(rules->iter_current_rule))
{
rules->iter_current_rule = rules->rules->rules_list_head;
PyErr_SetNone(PyExc_StopIteration);
return NULL;
}
......
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