Permalink
Browse files

Passing tests on DupleIndex querying

  • Loading branch information...
1 parent 128acf8 commit 573f984db2fb81794e9b5dc0f0b836be2a8ecf76 vincentchu committed Sep 19, 2011
@@ -29,12 +29,31 @@ VALUE method_alloc_index(VALUE self) {
return Data_Wrap_Struct(self, NULL, method_free_index, duples);
}
-VALUE method_free_index(VALUE self) {
- printf("\n\n**** method_free_index\n");
+/* VALUE method_free_index(struct duple_hash *duples) {*/
+/* printf("\n\n**** method_free_index\n");*/
- printf("malloc called %d times\n", n_malloc_calls);
- printf("free called %d times\n", n_free_calls);
-}
+/* struct duple_hash *d, *d_tmp;*/
+
+
+/* [> HASH_ITER(hh, duples, d, d_tmp) {<]*/
+/* [> printf("Freeing hash id = %d\n", d->id);<]*/
+
+/* [> destroy_duple_pos(d->strings);<]*/
+
+/* [> HASH_DEL(duples, d);<]*/
+/* [> n_free_calls++;<]*/
+/* [> free(d);<]*/
+/* [> }<]*/
+
+
+
+
+
+/* printf("malloc called %d times\n", n_malloc_calls);*/
+/* printf("free called %d times\n", n_free_calls);*/
+
+/* return Qnil;*/
+/* }*/
VALUE method_add(VALUE self, VALUE r_str_id, VALUE r_str) {
printf("\n\n**** method_add\n");
@@ -25,7 +25,7 @@ VALUE DupleIndex = Qnil;
void Init_duple_index();
VALUE method_alloc_index(VALUE self);
-VALUE method_free_index(VALUE self);
+VALUE method_free_index(struct duple_hash *duples);
VALUE method_add(VALUE self, VALUE r_str_id, VALUE r_str);
VALUE method_query(VALUE self, VALUE r_a, VALUE r_b);
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 573f984

Please sign in to comment.