From e2299697df9bdbaf654f0d5dc93c38b58ed0fb13 Mon Sep 17 00:00:00 2001 From: Derek Atkins Date: Mon, 24 Jun 2002 22:28:33 +0000 Subject: [PATCH] src/engine/gnc-lot.[ch]: provide gnc_lot_get_book() function git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7018 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/gnc-lot.c | 6 ++++++ src/engine/gnc-lot.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/gnc-lot.c b/src/engine/gnc-lot.c index ebf9695968..b9334be9df 100644 --- a/src/engine/gnc-lot.c +++ b/src/engine/gnc-lot.c @@ -130,6 +130,12 @@ gnc_lot_lookup (const GUID *guid, GNCBook *book) guid, GNC_ID_LOT); } +GNCBook * +gnc_lot_get_book (GNCLot *lot) +{ + if (!lot) return NULL; + return lot->book; +} /* ============================================================= */ diff --git a/src/engine/gnc-lot.h b/src/engine/gnc-lot.h index 44306e09c6..4e4c14f0e1 100644 --- a/src/engine/gnc-lot.h +++ b/src/engine/gnc-lot.h @@ -45,7 +45,7 @@ void gnc_lot_destroy (GNCLot *); const GUID * gnc_lot_get_guid (GNCLot *p); GNCLot * gnc_lot_lookup (const GUID *guid, GNCBook *book); - +GNCBook * gnc_lot_get_book (GNCLot *); /* The gnc_lot_add_split() routine adds a split to this lot. Note * that *all* splits in a lot must also be in the same account.