Skip to content

Commit

Permalink
Bug #638543: Remove the counter() method from the backends.
Browse files Browse the repository at this point in the history
Patch by Matthijs Kooijman:

This method is not implemented by either of the backends and removing it
makes the subsequent commits possible.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20052 57a11ea4-9604-0410-9ed3-97b8803252fd
  • Loading branch information
cstim committed Jan 10, 2011
1 parent ae30067 commit d565bdb
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 14 deletions.
2 changes: 0 additions & 2 deletions src/backend/dbi/gnc-backend-dbi.c
Expand Up @@ -1310,8 +1310,6 @@ init_sql_backend( GncDbiBackend* dbi_be )
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;
Expand Down
2 changes: 0 additions & 2 deletions src/backend/xml/gnc-backend-xml.c
Expand Up @@ -1219,8 +1219,6 @@ gnc_backend_new(void)
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;
Expand Down
4 changes: 0 additions & 4 deletions src/libqof/qof/qofbackend-p.h
Expand Up @@ -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.
Expand Down Expand Up @@ -317,7 +314,6 @@ struct QofBackend_s
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 *);
Expand Down
7 changes: 1 addition & 6 deletions src/libqof/qof/qofbook.c
Expand Up @@ -409,12 +409,7 @@ qof_book_get_counter (QofBook *book, const char *counter_name)
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)
Expand Down

0 comments on commit d565bdb

Please sign in to comment.