add debug prints

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9132 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2003-08-20 13:53:38 +00:00
parent 3fab6b6421
commit d635f2b424

View File

@ -33,6 +33,8 @@
#include "qofobject-p.h"
#include "qofbook.h"
static short module = MOD_QUERY;
static gboolean object_is_initialized = FALSE;
static GList *object_modules = NULL;
static GList *book_list = NULL;
@ -43,6 +45,7 @@ void qof_object_book_begin (QofBook *book)
GList *l;
if (!book) return;
ENTER (" ");
for (l = object_modules; l; l = l->next) {
QofObject *obj = l->data;
if (obj->book_begin)
@ -51,6 +54,7 @@ void qof_object_book_begin (QofBook *book)
/* Remember this book for later */
book_list = g_list_prepend (book_list, book);
LEAVE (" ");
}
void qof_object_book_end (QofBook *book)
@ -58,6 +62,7 @@ void qof_object_book_end (QofBook *book)
GList *l;
if (!book) return;
ENTER (" ");
for (l = object_modules; l; l = l->next) {
QofObject *obj = l->data;
if (obj->book_end)
@ -66,6 +71,7 @@ void qof_object_book_end (QofBook *book)
/* Remove it from the list */
book_list = g_list_remove (book_list, book);
LEAVE (" ");
}
gboolean qof_object_is_dirty (QofBook *book)
@ -112,12 +118,17 @@ void qof_object_foreach (QofIdTypeConst type_name, QofBook *book,
const QofObject *obj;
if (!book || !type_name) return;
ENTER ("type=%s", type_name);
obj = qof_object_lookup (type_name);
PINFO ("lookup obj=%p for type=%s", obj, type_name);
if (!obj) return;
if (obj->foreach)
return (obj->foreach (book, cb, user_data));
PINFO ("type=%s foreach=%p", type_name, obj->foreach);
if (obj->foreach) {
obj->foreach (book, cb, user_data);
}
LEAVE ("type=%s", type_name);
return;
}