[Gnucash-changes] QSF backend, support for partial QofBooks,
merge fix, references and KVP
Chris Shoemaker
c.shoemaker at cox.net
Sun Feb 20 19:25:15 EST 2005
On Mon, Feb 21, 2005 at 12:04:34AM +0000, Neil Williams wrote:
> On Sunday 20 February 2005 11:35 pm, Chris Shoemaker wrote:
> > On Sun, Feb 20, 2005 at 10:57:10PM +0000, Neil Williams wrote:
>
> > And "the given kvp_frame"? What kvp_frame? The only
> > argument is a KvpValue
>
> You can't have a value outside a frame - the GHashTable at the top of the KVP
> tree for this entity. You always pass a returned KvpValue to
> kvp_frame_set_value or similar, so there's always an implicit frame.
Not true:
KvpValue *vald, *vallist;
GList *list, *list2;
vald = kvp_value_new_double(1.0);
list = g_list_append(NULL, vald);
//list is now a GList of KvpValues
vallist = kvp_value_new_glist(list);
list2 = kvp_value_get_glist(valllist);
//No frames to be found.
>
> > , and if its sub-type _happens_ to be KvpFrame,
> > then this function returns NULL.
>
> Does it? If the value->type is not KVP_TYPE_GLIST, it returns NULL
Right, it returns a null pointer.
> but the *contents* of the GList are not inspected at this point.
huh? What GList? There _is_ no GList if value->type != KVP_TYPE_GLIST.
> A list containing
> KvpValues of KvpValueType == KVP_TYPE_FRAME is treated no differently to a
> GList of KvpValues of any other KvpValueType.
Exactly. That's why it doesn't make sense to mention a kvp_frame in
the description for:
GList * kvp_value_get_glist(const KvpValue * value);
>
> Look at the description for kvp_value_new_glist
> http://code.neil.williamsleesmill.me.uk/gnome2/group__KVP.html#ga63
>
> It's a list of values, which can include more frames.
or any other kvpvalue subtypes.
-chris
More information about the gnucash-devel
mailing list