diff options
author | Akira TAGOH <akira@tagoh.org> | 2006-09-04 12:06:44 +0000 |
---|---|---|
committer | Akira TAGOH <akira@tagoh.org> | 2006-09-04 12:06:44 +0000 |
commit | fc6356e512fcc09fc05848d77e3be87684d0c56d (patch) | |
tree | e03c89bd45def2e7f9dc3d7b963faf921df3ae6f | |
parent | 8e7bcb5cbd8e01256d2fcfcbf4b9310bf011aee4 (diff) |
* tests/hgbtree.c: fixed to get it successful.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | hieroglyph/version.h.in | 2 | ||||
-rw-r--r-- | tests/hgbtree.c | 7 |
3 files changed, 10 insertions, 4 deletions
@@ -1,5 +1,10 @@ 2006-09-04 Akira TAGOH <at@gclab.org> + * hieroglyph/hgallocator-bfit.c: use HgList instead of GSList. + (_hg_allocator_bfit_btree_traverse_in_destroy): removed. + (_hg_allocator_bfit_real_initialize): libc pool is no longer needed. + (_hg_allocator_bfit_real_free_block_traverse): new function. + * hieroglyph/ilist.c (_hg_list_free): check NULL. (_hg_list_iter_delete_link): fixed a memory leak. diff --git a/hieroglyph/version.h.in b/hieroglyph/version.h.in index c86fbdf..ecd5a16 100644 --- a/hieroglyph/version.h.in +++ b/hieroglyph/version.h.in @@ -29,7 +29,7 @@ G_BEGIN_DECLS #define HIEROGLYPH_VERSION "@VERSION@" -#define HIEROGLYPH_UUID "448f79e5-4297-4c44-9d20-adf09eb7e7ec" +#define HIEROGLYPH_UUID "22af8123-418d-4988-a0ec-3b2381a8739c" const char *__hg_rcsid G_GNUC_UNUSED = "$Rev$"; diff --git a/tests/hgbtree.c b/tests/hgbtree.c index 97f1a3f..ee4a076 100644 --- a/tests/hgbtree.c +++ b/tests/hgbtree.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <string.h> #include <hieroglyph/hgmem.h> -#include <hieroglyph/hgallocator-libc.h> +#include <hieroglyph/hgallocator-bfit.h> #include <hieroglyph/hgbtree.h> void @@ -30,8 +30,8 @@ main(void) { HG_MEM_INIT; - HgAllocator *allocator = hg_allocator_new(hg_allocator_libc_get_vtable()); - HgMemPool *pool = hg_mem_pool_new(allocator, "btree_test", 256, FALSE); + HgAllocator *allocator = hg_allocator_new(hg_allocator_bfit_get_vtable()); + HgMemPool *pool = hg_mem_pool_new(allocator, "btree_test", 1024, TRUE); HgBTree *tree = hg_btree_new(pool, 2); GString *string = g_string_new(NULL); gchar *test1 = "(.0.1.2.3.)"; @@ -40,6 +40,7 @@ main(void) gint i; HgBTreeIter iter = hg_btree_iter_new(); + hg_btree_allow_marking(tree, FALSE); hg_btree_add(tree, GINT_TO_POINTER (0), GINT_TO_POINTER (0)); hg_btree_add(tree, GINT_TO_POINTER (1), GINT_TO_POINTER (1)); hg_btree_add(tree, GINT_TO_POINTER (2), GINT_TO_POINTER (2)); |