* kvp-scm: implement KVP_TYPE_FRAME kvp-values

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7091 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2002-07-06 22:44:13 +00:00
parent 62c76bce36
commit 1aa8299725
2 changed files with 16 additions and 3 deletions

View File

@ -5,6 +5,8 @@
* kvp-scm: create gnc_kvp_frame_delete_at_path() and wrap it.
This function will clear a sub-tree out of a kvp_frame.
* kvp-scm: implement KVP_TYPE_FRAME kvp-values
2002-07-05 Derek Atkins <derek@ihtfp.com>

View File

@ -52,9 +52,13 @@ gnc_scm_to_kvp_value_ptr(SCM val)
free(newstr);
return ret;
}
else if(gw_wcp_p(val) &&
gw_wcp_is_of_type_p(gh_eval_str("<gnc:kvp-frame*>"), val))
{
return gw_wcp_get_ptr(val);
}
/* FIXME: add binary handler here when it's figured out */
/* FIXME: add list handler here */
/* FIXME: add frame handler here when it's figured out */
return NULL;
}
@ -85,13 +89,20 @@ gnc_kvp_value_ptr_to_scm(kvp_value* val)
return gnc_timespec2timepair(kvp_value_get_timespec(val));
break;
case KVP_TYPE_FRAME:
{
kvp_frame *frame = kvp_value_get_frame(val);
if (frame)
return gw_wcp_assimilate_ptr (frame,
gh_eval_str("<gnc:kvp-frame*>"));
}
break;
/* FIXME: handle types below */
case KVP_TYPE_BINARY:
break;
case KVP_TYPE_GLIST:
break;
case KVP_TYPE_FRAME:
break;
}
return SCM_BOOL_F;
}