mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2004-01-31 Christian Stimming <stimming@tuhh.de>
* src/engine/kvp_frame.h, src/engine/Account.c: Add clear notice of the semantic change of kvp_frame_get_frame function. Fortunately it seems the only place that still had to be fixed, apart from the hbci module, has been in Account.c. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@9815 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
296f308be8
commit
1068838bdc
@ -2411,8 +2411,9 @@ xaccAccountSetReconcileLastInterval (Account *account, int months, int days)
|
||||
|
||||
xaccAccountBeginEdit (account);
|
||||
|
||||
frame = kvp_frame_get_frame (account->inst.kvp_data,
|
||||
frame = kvp_frame_get_frame_slash (account->inst.kvp_data,
|
||||
"/reconcile-info/last-interval");
|
||||
g_assert(frame);
|
||||
|
||||
kvp_frame_set_gint64 (frame, "months", months);
|
||||
kvp_frame_set_gint64 (frame, "days", days);
|
||||
|
@ -286,7 +286,7 @@ KvpFrame * kvp_frame_add_value_nc(KvpFrame * frame, const char * path, KvpValue
|
||||
are "non-copying" -- the returned item is the actual item stored.
|
||||
Do not delete this item unless you take the required care to avoid
|
||||
possible bad pointer derefrences (i.e. core dumps). Also, be
|
||||
careful anging on to those references if you are also storing
|
||||
careful hanging on to those references if you are also storing
|
||||
at the same path names: the referenced item will be freed during
|
||||
the store.
|
||||
|
||||
@ -305,22 +305,49 @@ void * kvp_frame_get_binary(const KvpFrame *frame, const char *path,
|
||||
guint64 * size_return);
|
||||
Timespec kvp_frame_get_timespec(const KvpFrame *frame, const char *path);
|
||||
KvpValue * kvp_frame_get_value(const KvpFrame *frame, const char *path);
|
||||
/** Value accessor. Takes a unix-style slash-separated path as an
|
||||
* argument, and return the KvpFrame stored at that location. If the
|
||||
* KvpFrame does not exist, then a NULL is returned.
|
||||
*
|
||||
* @note The semantics here have changed: In gnucash-1.8, if the
|
||||
* KvpFrame did not exist, this function automatically created one
|
||||
* and returned it. However, now this function will return NULL in
|
||||
* this case and the caller has to create a KvpFrame on his own. The
|
||||
* old functionality is now implemented by
|
||||
* kvp_frame_get_frame_path(). This happened on 2003-09-14, revision
|
||||
* 1.31. FIXME: Is it really a good idea to change the semantics of
|
||||
* an existing function and move the old semantics to a new
|
||||
* function??! It would save us a lot of trouble if the new semantics
|
||||
* would have been available in a new function!
|
||||
*
|
||||
* @return The KvpFrame at the specified path, or NULL if it doesn't
|
||||
* exist.
|
||||
*/
|
||||
KvpFrame * kvp_frame_get_frame(const KvpFrame *frame, const char *path);
|
||||
|
||||
/** This routine returns the last frame of the path.
|
||||
* If the frame path doesn't exist, it is created.
|
||||
* Note that this is *VERY DIFFERENT FROM* like kvp_frame_get_frame()
|
||||
*
|
||||
* @note The semantics of this function implemented the gnucash-1.8
|
||||
* behaviour of kvp_frame_get_frame: In gnucash-1.8, if the KvpFrame
|
||||
* did not exist, kvp_frame_get_frame automatically created one and
|
||||
* returned it. However, now that one will return NULL in this case
|
||||
* and the caller has to create a KvpFrame on his own. The old
|
||||
* functionality is implemented by this
|
||||
* kvp_frame_get_frame_path(). This happened on 2003-09-14, revision
|
||||
* 1.31.
|
||||
*/
|
||||
KvpFrame * kvp_frame_get_frame_path (KvpFrame *frame, const char *,...);
|
||||
|
||||
/** This routine return the last frame of the path.
|
||||
/** This routine returns the last frame of the path.
|
||||
* If the frame path doesn't exist, it is created.
|
||||
* Note that this is *VERY DIFFERENT FROM* like kvp_frame_get_frame()
|
||||
*/
|
||||
KvpFrame * kvp_frame_get_frame_gslist (KvpFrame *frame,
|
||||
GSList *key_path);
|
||||
|
||||
/** This routine return the last frame of the path.
|
||||
/** This routine returns the last frame of the path.
|
||||
* If the frame path doesn't exist, it is created.
|
||||
* Note that this is *VERY DIFFERENT FROM* like kvp_frame_get_frame()
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user