diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2006-03-31 03:51:07 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2006-03-31 03:51:07 +0000 |
commit | 24bb4db74a8e09f6c1a80422f25fab65433197bb (patch) | |
tree | a5d71685d273ba524e38f9ff0055e72eb9fc5199 /src/trie.c | |
parent | 3a497bbf82003a216046c4f66f0fe467745ee788 (diff) |
Bug 336117 – [patch] Use g_slice API Patch from Aivars Kalvans.
2006-03-30 Behdad Esfahbod <behdad@gnome.org>
Bug 336117 – [patch] Use g_slice API
Patch from Aivars Kalvans.
* src/*.c: Use g_slice instead of g_malloc for structs.
Also, replace g_string_new("") with g_string_new(NULL).
Diffstat (limited to 'src/trie.c')
-rw-r--r-- | src/trie.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -372,7 +372,7 @@ static struct char_class char_classes[] = { TRIE_MAYBE_STATIC struct _vte_trie * _vte_trie_new(void) { - return g_malloc0(sizeof(struct _vte_trie)); + return g_slice_new0(struct _vte_trie); } TRIE_MAYBE_STATIC void @@ -385,7 +385,7 @@ _vte_trie_free(struct _vte_trie *trie) if (trie->trie_path_count > 0) { g_free(trie->trie_paths); } - g_free(trie); + g_slice_free(struct _vte_trie, trie); } /* Add the given pattern, with its own result string, to the trie, with the |