From cbbde951b4970452ebcc9507b7fbf7bb5c7a0007 Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Tue, 7 Nov 2000 21:03:07 +0000 Subject: [PATCH] Use engine cache for strings. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3131 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/register/QuickFill.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/register/QuickFill.c b/src/register/QuickFill.c index e4960ad86a..1aadb57b76 100644 --- a/src/register/QuickFill.c +++ b/src/register/QuickFill.c @@ -23,12 +23,13 @@ * * \********************************************************************/ +#include "config.h" + #include #include -#include "config.h" - #include "QuickFill.h" +#include "gnc-engine.h" #include "gnc-engine-util.h" @@ -47,7 +48,7 @@ static void quickfill_insert_recursive (QuickFill *qf, const char *text, static short module = MOD_REGISTER; /* A cache for quickfill strings */ -GCache * qf_string_cache = NULL; +static GCache * qf_string_cache = NULL; /********************************************************************\ @@ -74,12 +75,9 @@ gnc_quickfill_new (void) { QuickFill *qf; + /* For now, use the engine cache. */ if (qf_string_cache == NULL) - { - qf_string_cache = g_cache_new((GCacheNewFunc) g_strdup, g_free, - (GCacheDupFunc) g_strdup, g_free, - g_str_hash, g_str_hash, g_str_equal); - } + qf_string_cache = gnc_string_cache; qf = g_new (QuickFill, 1);