r16228 - gnucash/trunk/lib/libqof/qof - Add warning when overwriting an already installed dirty-callback.

Christian Stimming cstim at cvs.gnucash.org
Sat Jun 30 07:38:33 EDT 2007


Author: cstim
Date: 2007-06-30 07:38:33 -0400 (Sat, 30 Jun 2007)
New Revision: 16228
Trac: http://svn.gnucash.org/trac/changeset/16228

Modified:
   gnucash/trunk/lib/libqof/qof/qofbook.c
Log:
Add warning when overwriting an already installed dirty-callback.


Modified: gnucash/trunk/lib/libqof/qof/qofbook.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qofbook.c	2007-06-30 10:31:20 UTC (rev 16227)
+++ gnucash/trunk/lib/libqof/qof/qofbook.c	2007-06-30 11:38:33 UTC (rev 16228)
@@ -221,6 +221,9 @@
 void
 qof_book_set_dirty_cb(QofBook *book, QofBookDirtyCB cb, gpointer user_data)
 {
+  if (book->dirty_cb)
+    g_warning("qof_book_set_dirty_cb: Already existing callback %p, will be overwritten by %p\n",
+	      book->dirty_cb, cb);
   book->dirty_data = user_data;
   book->dirty_cb = cb;
 }



More information about the gnucash-changes mailing list