fix a backend bug. Hope this is the last change for a while ...

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4397 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Linas Vepstas 2001-06-03 19:04:52 +00:00
parent 1bd38548a3
commit 9d2f5a1969
2 changed files with 8 additions and 1 deletions

View File

@ -64,12 +64,15 @@ typedef enum {
LOOKUP_LATEST = 1,
LOOKUP_ALL,
LOOKUP_AT_TIME,
LOOKUP_NEAREST_IN_TIME
LOOKUP_NEAREST_IN_TIME,
LOOKUP_LATEST_BEFORE,
LOOKUP_EARLIEST_AFTER
} PriceLookupType;
struct _GNCPriceLookup {
PriceLookupType type;
GNCPriceDB *prdb;
gnc_commodity *commodity;
gnc_commodity *currency;
Timespec date;

View File

@ -642,6 +642,7 @@ gnc_pricedb_lookup_latest(GNCPriceDB *db,
{
GNCPriceLookup pl;
pl.type = LOOKUP_LATEST;
pl.prdb = db;
pl.commodity = commodity;
pl.currency = currency;
(db->backend->price_lookup) (db->backend, &pl);
@ -678,6 +679,7 @@ gnc_pricedb_get_prices(GNCPriceDB *db,
{
GNCPriceLookup pl;
pl.type = LOOKUP_ALL;
pl.prdb = db;
pl.commodity = commodity;
pl.currency = currency;
(db->backend->price_lookup) (db->backend, &pl);
@ -715,6 +717,7 @@ gnc_pricedb_lookup_at_time(GNCPriceDB *db,
{
GNCPriceLookup pl;
pl.type = LOOKUP_AT_TIME;
pl.prdb = db;
pl.commodity = c;
pl.currency = currency;
pl.date = t;
@ -762,6 +765,7 @@ gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
{
GNCPriceLookup pl;
pl.type = LOOKUP_NEAREST_IN_TIME;
pl.prdb = db;
pl.commodity = c;
pl.currency = currency;
pl.date = t;