xaccAccountEqual ?

Derek Atkins warlord at MIT.EDU
Mon Jan 9 16:17:02 EST 2012


Hendrik Boom <hendrik at topoi.pooq.com> writes:

>> I thought you were working on learning to script Gnucash with Guile.
>
> In part, yes.  But I'm really trying to learn to write an introduction 
> for people who want to learn to script Gnucash with Guile.

True, and from a user perspective xaccAccountEqual() is the API way to
test whether two account objects point to the same Account.  Just
testing for acc1 == acc2 may work in some cases, and I believe that
xaccAccountEqual() does have that short-circuit in there.  But users
should use the API.

This isn't C++.  If it were then yes, we could have overridden the '=='
operator to do a deep-inspection compare if the pointers are different.
But because this is C we had to write our own API and ask users to use
it.

-derek

-- 
       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