Explicitly including glib.h instead of relying on libqof to reduce dependency problems.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13749 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Neil Williams
2006-04-07 18:51:52 +00:00
parent 26a4051c70
commit 66a9c0b6ac
21 changed files with 43 additions and 38 deletions

View File

@@ -242,8 +242,8 @@ xaccInitTransaction (Transaction * trans, QofBook *book)
{
ENTER ("trans=%p", trans);
/* Fill in some sane defaults */
trans->num = gnc_string_cache_insert("");
trans->description = gnc_string_cache_insert("");
trans->num = QOF_CACHE_NEW();
trans->description = QOF_CACHE_NEW();
trans->common_currency = NULL;
trans->splits = NULL;
@@ -358,8 +358,8 @@ xaccDupeTransaction (const Transaction *t)
trans = g_new0 (Transaction, 1);
trans->num = gnc_string_cache_insert (t->num);
trans->description = gnc_string_cache_insert (t->description);
trans->num = qof_util_string_cache_insert (t->num);
trans->description = qof_util_string_cache_insert (t->description);
trans->splits = g_list_copy (t->splits);
for (node = trans->splits; node; node = node->next)
@@ -405,8 +405,8 @@ xaccTransClone (const Transaction *t)
trans->date_entered = t->date_entered;
trans->date_posted = t->date_posted;
trans->num = gnc_string_cache_insert (t->num);
trans->description = gnc_string_cache_insert (t->description);
trans->num = qof_util_string_cache_insert (t->num);
trans->description = qof_util_string_cache_insert (t->description);
trans->common_currency = t->common_currency;
trans->version = t->version;
trans->version_check = t->version_check;
@@ -458,8 +458,8 @@ xaccFreeTransaction (Transaction *trans)
trans->splits = NULL;
/* free up transaction strings */
gnc_string_cache_remove(trans->num);
gnc_string_cache_remove(trans->description);
qof_util_string_cache_remove(trans->num);
qof_util_string_cache_remove(trans->description);
/* Just in case someone looks up freed memory ... */
trans->num = (char *) 1;