fix recursive functions that manipulate tries

This commit is contained in:
Ricardo Rocha
2009-08-05 05:48:00 +01:00
parent f68cc92bce
commit cf5d68edda
5 changed files with 461 additions and 399 deletions

View File

@@ -684,7 +684,7 @@ Int p_abolish_table(void) {
sg_node = TrNode_child(TabEnt_subgoal_trie(tab_ent));
if (sg_node) {
TrNode_child(TabEnt_subgoal_trie(tab_ent)) = NULL;
free_subgoal_trie_branch(sg_node, TabEnt_arity(tab_ent), 0);
free_subgoal_trie_branch(sg_node, TabEnt_arity(tab_ent), 0, TRAVERSE_POSITION_FIRST);
}
return (TRUE);
}
@@ -704,7 +704,7 @@ Int p_abolish_all_tables(void) {
sg_node = TrNode_child(TabEnt_subgoal_trie(tab_ent));
if (sg_node) {
TrNode_child(TabEnt_subgoal_trie(tab_ent)) = NULL;
free_subgoal_trie_branch(sg_node, TabEnt_arity(tab_ent), 0);
free_subgoal_trie_branch(sg_node, TabEnt_arity(tab_ent), 0, TRAVERSE_POSITION_FIRST);
}
tab_ent = TabEnt_next(tab_ent);
}