Item collection building returns the collection
authorThadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
Sun, 23 Oct 2005 22:26:18 +0000 (22:26 +0000)
committerThadeu Lima de Souza Cascardo <cascardo@dcc.ufmg.br>
Sun, 23 Oct 2005 22:26:18 +0000 (22:26 +0000)
Function that builds the item collection returns it instead of simply
destroying it.

git-archimport-id: cascardo@tlscascardo--private/libgrammatic--lr1--0.1--patch-4

item.c

diff --git a/item.c b/item.c
index 3eb8fe3..c4c5373 100644 (file)
--- a/item.c
+++ b/item.c
@@ -442,7 +442,8 @@ GHashTable* item_collection_goto (GHashTable* collection, Grammar* grammar,
   return return_item_set;
 }
 
-void item_set_collection (Grammar* grammar, GHashTable* first, symbol_t* start)
+GHashTable* item_set_collection (Grammar* grammar, GHashTable* first,
+                                symbol_t* start)
 {
   GHashTable* collection;
   GHashTable* item_set;
@@ -491,5 +492,5 @@ void item_set_collection (Grammar* grammar, GHashTable* first, symbol_t* start)
 #ifdef DEBUG
   item_collection_print (collection);
 #endif
-  g_hash_table_destroy (collection);
+  return collection;
 }