mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
Change order of variables given to foreach_dom_node iterators
This commit is contained in:
parent
330c0174e5
commit
b64e122159
@ -94,7 +94,7 @@ del_from_dom_node_list(struct dom_node_list *list, struct dom_node *node)
|
|||||||
|
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
|
|
||||||
foreach_dom_node(i, entry, list) {
|
foreach_dom_node (list, entry, i) {
|
||||||
size_t successors;
|
size_t successors;
|
||||||
|
|
||||||
if (entry != node) continue;
|
if (entry != node) continue;
|
||||||
@ -115,7 +115,7 @@ done_dom_node_list(struct dom_node_list *list)
|
|||||||
|
|
||||||
assert(list);
|
assert(list);
|
||||||
|
|
||||||
foreach_dom_node (i, node, list) {
|
foreach_dom_node (list, node, i) {
|
||||||
/* Avoid that the node start messing with the node list. */
|
/* Avoid that the node start messing with the node list. */
|
||||||
done_dom_node_data(node);
|
done_dom_node_data(node);
|
||||||
}
|
}
|
||||||
|
@ -214,11 +214,11 @@ struct dom_node_list {
|
|||||||
struct dom_node *entries[1];
|
struct dom_node *entries[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
#define foreach_dom_node(i, node, list) \
|
#define foreach_dom_node(list, node, i) \
|
||||||
for ((i) = 0; (i) < (list)->size; (i)++) \
|
for ((i) = 0; (i) < (list)->size; (i)++) \
|
||||||
if (((node) = (list)->entries[(i)]))
|
if (((node) = (list)->entries[(i)]))
|
||||||
|
|
||||||
#define foreachback_dom_node(i, node, list) \
|
#define foreachback_dom_node(list, node, i) \
|
||||||
for ((i) = (list)->size - 1; (i) > 0; (i)--) \
|
for ((i) = (list)->size - 1; (i) > 0; (i)--) \
|
||||||
if (((node) = (list)->entries[(i)]))
|
if (((node) = (list)->entries[(i)]))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user