r20052 - gnucash/trunk/src - Bug #638543: Remove the counter() method from the backends.
Christian Stimming
cstim at code.gnucash.org
Mon Jan 10 16:38:44 EST 2011
Author: cstim
Date: 2011-01-10 16:38:43 -0500 (Mon, 10 Jan 2011)
New Revision: 20052
Trac: http://svn.gnucash.org/trac/changeset/20052
Modified:
gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
gnucash/trunk/src/backend/xml/gnc-backend-xml.c
gnucash/trunk/src/libqof/qof/qofbackend-p.h
gnucash/trunk/src/libqof/qof/qofbook.c
Log:
Bug #638543: Remove the counter() method from the backends.
Patch by Matthijs Kooijman:
This method is not implemented by either of the backends and removing it
makes the subsequent commits possible.
Modified: gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
===================================================================
--- gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c 2011-01-10 20:12:39 UTC (rev 20051)
+++ gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c 2011-01-10 21:38:43 UTC (rev 20052)
@@ -1310,8 +1310,6 @@
be->commit = gnc_dbi_commit_edit;
be->rollback = gnc_dbi_rollback_edit;
- be->counter = NULL;
-
/* The gda backend will not be multi-user (for now)... */
be->events_pending = NULL;
be->process_events = NULL;
Modified: gnucash/trunk/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2011-01-10 20:12:39 UTC (rev 20051)
+++ gnucash/trunk/src/backend/xml/gnc-backend-xml.c 2011-01-10 21:38:43 UTC (rev 20052)
@@ -1219,8 +1219,6 @@
be->free_query = NULL;
be->run_query = NULL;
- be->counter = NULL;
-
/* The file backend will never be multi-user... */
be->events_pending = NULL;
be->process_events = NULL;
Modified: gnucash/trunk/src/libqof/qof/qofbackend-p.h
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbackend-p.h 2011-01-10 20:12:39 UTC (rev 20051)
+++ gnucash/trunk/src/libqof/qof/qofbackend-p.h 2011-01-10 21:38:43 UTC (rev 20052)
@@ -156,9 +156,6 @@
* data. Database backends should implement a more intelligent
* solution.
*
- * The counter() routine increments the named counter and returns the
- * post-incremented value. Returns -1 if there is a problem.
- *
* The events_pending() routines should return true if there are
* external events which need to be processed to bring the
* engine up to date with the backend.
@@ -317,7 +314,6 @@
void (*load_config) (QofBackend *, KvpFrame *);
/*@ observer @*/
KvpFrame* (*get_config) (QofBackend *);
- gint64 (*counter) (QofBackend *, const char *counter_name);
gboolean (*events_pending) (QofBackend *);
gboolean (*process_events) (QofBackend *);
Modified: gnucash/trunk/src/libqof/qof/qofbook.c
===================================================================
--- gnucash/trunk/src/libqof/qof/qofbook.c 2011-01-10 20:12:39 UTC (rev 20051)
+++ gnucash/trunk/src/libqof/qof/qofbook.c 2011-01-10 21:38:43 UTC (rev 20052)
@@ -409,12 +409,7 @@
return -1;
}
- /* If we've got a backend with a counter method, call it */
- be = book->backend;
- if (be && be->counter)
- return ((be->counter)(be, counter_name));
-
- /* If not, then use the KVP in the book */
+ /* Use the KVP in the book */
kvp = qof_book_get_slots (book);
if (!kvp)
More information about the gnucash-changes
mailing list