Lines 362-368
Link Here
|
362 |
|
362 |
|
363 |
static void |
363 |
static void |
364 |
IDL_tree_traverse_helper(IDL_tree p, GFunc f, |
364 |
IDL_tree_traverse_helper(IDL_tree p, GFunc f, |
365 |
gconstpointer func_data, |
365 |
gconstpointer gfunc_data, |
366 |
GHashTable *visited_nodes, |
366 |
GHashTable *visited_nodes, |
367 |
gboolean include_self) |
367 |
gboolean include_self) |
368 |
{ |
368 |
{ |
Lines 376-392
Link Here
|
376 |
for (curitem = IDL_INTERFACE (p).inheritance_spec; curitem; |
376 |
for (curitem = IDL_INTERFACE (p).inheritance_spec; curitem; |
377 |
curitem = IDL_LIST (curitem).next) { |
377 |
curitem = IDL_LIST (curitem).next) { |
378 |
IDL_tree_traverse_helper (IDL_get_parent_node |
378 |
IDL_tree_traverse_helper (IDL_get_parent_node |
379 |
(IDL_LIST (curitem).data, IDLN_INTERFACE, NULL), f, func_data, visited_nodes, TRUE); |
379 |
(IDL_LIST (curitem).data, IDLN_INTERFACE, NULL), f, gfunc_data, visited_nodes, TRUE); |
380 |
} |
380 |
} |
381 |
|
381 |
|
382 |
if (include_self) |
382 |
if (include_self) |
383 |
f(p, (gpointer)func_data); |
383 |
f(p, (gpointer)gfunc_data); |
384 |
} |
384 |
} |
385 |
|
385 |
|
386 |
void |
386 |
void |
387 |
IDL_tree_traverse_parents_full (IDL_tree p, |
387 |
IDL_tree_traverse_parents_full (IDL_tree p, |
388 |
GFunc f, |
388 |
GFunc f, |
389 |
gconstpointer func_data, |
389 |
gconstpointer gfunc_data, |
390 |
gboolean include_self) |
390 |
gboolean include_self) |
391 |
{ |
391 |
{ |
392 |
GHashTable *visited_nodes = g_hash_table_new (NULL, g_direct_equal); |
392 |
GHashTable *visited_nodes = g_hash_table_new (NULL, g_direct_equal); |
Lines 400-406
Link Here
|
400 |
if (!p) |
400 |
if (!p) |
401 |
return; |
401 |
return; |
402 |
|
402 |
|
403 |
IDL_tree_traverse_helper (p, f, func_data, visited_nodes, include_self); |
403 |
IDL_tree_traverse_helper (p, f, gfunc_data, visited_nodes, include_self); |
404 |
|
404 |
|
405 |
g_hash_table_destroy (visited_nodes); |
405 |
g_hash_table_destroy (visited_nodes); |
406 |
} |
406 |
} |
Lines 408-416
Link Here
|
408 |
void |
408 |
void |
409 |
IDL_tree_traverse_parents (IDL_tree p, |
409 |
IDL_tree_traverse_parents (IDL_tree p, |
410 |
GFunc f, |
410 |
GFunc f, |
411 |
gconstpointer func_data) |
411 |
gconstpointer gfunc_data) |
412 |
{ |
412 |
{ |
413 |
IDL_tree_traverse_parents_full (p, f, func_data, TRUE); |
413 |
IDL_tree_traverse_parents_full (p, f, gfunc_data, TRUE); |
414 |
} |
414 |
} |
415 |
|
415 |
|
416 |
/* For use by below function */ |
416 |
/* For use by below function */ |