Swig type mapping for GUID's

Derek Atkins warlord at MIT.EDU
Thu Feb 19 08:17:37 EST 2009

Charles Day <cedayiv at gmail.com> writes:

>     Either that or gnc_guid2scm(guidnull()) ??
>     I'm not sure why it is the way it is, nor am I sure what it SHOULD be.
>     SCM_BOOL_F probably is correct.
> qof_instance_get_guid() can return a normal GUID, guid_null(), or NULL (upon
> failure). So it seems there ought to be a way for the caller (Scheme) to
> distinguish between the last two. Having #f returned to Scheme seems like a
> natural fit, as #f is returned by many Scheme procedures to indicate a bad
> result.

Okay, then make it SCM_BOOL_F

> A second issue is how GUID's are currently handled within Scheme. To
> represent, say, a C split in Scheme, a record is filled out with the values of
> each field (e.g. date, amount, account). The "account" is stored in Scheme by
> use of its GUID, which may not exist if the split has not yet been assigned to
> an account. How do we intend to represent this situation in Scheme? I don't
> see any code that handles this, and #f would seem to be appropriate.

Well, GUID == NULL -> SCM_BOOL_F seems to continue to work here.


       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list