mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* kvp-scm: create gnc_kvp_frame_delete_at_path() and wrap it.
This function will clear a sub-tree out of a kvp_frame. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7090 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
873f0bf369
commit
62c76bce36
@ -3,6 +3,9 @@
|
|||||||
* gw-kvp-spec.scm: wrap kvp_slot_set_slot_path_gslist(),
|
* gw-kvp-spec.scm: wrap kvp_slot_set_slot_path_gslist(),
|
||||||
kvp_slot_get_slot_path_gslist(), and gnc_book_get_slots()
|
kvp_slot_get_slot_path_gslist(), and gnc_book_get_slots()
|
||||||
|
|
||||||
|
* kvp-scm: create gnc_kvp_frame_delete_at_path() and wrap it.
|
||||||
|
This function will clear a sub-tree out of a kvp_frame.
|
||||||
|
|
||||||
2002-07-05 Derek Atkins <derek@ihtfp.com>
|
2002-07-05 Derek Atkins <derek@ihtfp.com>
|
||||||
|
|
||||||
* gw-engine-spec.scm: wrap gnc_lot_get_split_list
|
* gw-engine-spec.scm: wrap gnc_lot_get_split_list
|
||||||
|
@ -40,6 +40,15 @@
|
|||||||
'(c-var " = gnc_scm_to_kvp_value_ptr(" scm-var ");\n")
|
'(c-var " = gnc_scm_to_kvp_value_ptr(" scm-var ");\n")
|
||||||
'(scm-var " = gnc_kvp_value_ptr_to_scm(" c-var ");\n"))
|
'(scm-var " = gnc_kvp_value_ptr_to_scm(" c-var ");\n"))
|
||||||
|
|
||||||
|
(gw:wrap-function
|
||||||
|
ws
|
||||||
|
'gnc:kvp-frame-delete-at-path
|
||||||
|
'<gw:void>
|
||||||
|
"gnc_kvp_frame_delete_at_path"
|
||||||
|
'((<gnc:kvp-frame*> f)
|
||||||
|
((gw:glist-of (<gw:mchars> caller-owned const) caller-owned) key-path))
|
||||||
|
"Deletes the kvp_frame at the key-path in frame f")
|
||||||
|
|
||||||
(gw:wrap-function
|
(gw:wrap-function
|
||||||
ws
|
ws
|
||||||
'gnc:kvp-frame-set-slot
|
'gnc:kvp-frame-set-slot
|
||||||
|
@ -95,3 +95,16 @@ gnc_kvp_value_ptr_to_scm(kvp_value* val)
|
|||||||
}
|
}
|
||||||
return SCM_BOOL_F;
|
return SCM_BOOL_F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gnc_kvp_frame_delete_at_path (kvp_frame *frame, GSList *key_path)
|
||||||
|
{
|
||||||
|
kvp_value *val;
|
||||||
|
|
||||||
|
val = kvp_frame_get_slot_path_gslist (frame, key_path);
|
||||||
|
if (!val) return;
|
||||||
|
if (kvp_value_get_type (val) == KVP_TYPE_FRAME) {
|
||||||
|
frame = kvp_value_get_frame (val);
|
||||||
|
kvp_frame_delete (frame);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
int gnc_kvp_value_ptr_p(SCM arg);
|
int gnc_kvp_value_ptr_p(SCM arg);
|
||||||
kvp_value* gnc_scm_to_kvp_value_ptr(SCM kvpval);
|
kvp_value* gnc_scm_to_kvp_value_ptr(SCM kvpval);
|
||||||
SCM gnc_kvp_value_ptr_to_scm(kvp_value* val);
|
SCM gnc_kvp_value_ptr_to_scm(kvp_value* val);
|
||||||
|
void gnc_kvp_frame_delete_at_path(kvp_frame *frame, GSList *key_path);
|
||||||
|
|
||||||
#endif /* KVP_SCM_H */
|
#endif /* KVP_SCM_H */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user