xaccAccountEqual ?

Hendrik Boom hendrik at topoi.pooq.com
Sun Jan 8 13:40:50 EST 2012


On Sat, Jan 07, 2012 at 04:23:16PM -0500, Derek Atkins wrote:
> Hi,
> 
> On Sat, January 7, 2012 2:35 pm, Hendrik Boom wrote:
> > What's xaccAccountEqual for?  Is it actually something gnucash uses (I
> > can't imagine what for), or is it just there because guile wants the smob
> > to have a function that tests deep equality?
> 
> I don't understand the question.  It's there to test equality of two
> Account objects. The API is used in a dozen places throughout the code.

I can see testing two pointers to Account objects to see if they point 
to the same Account object.  But I thought, perhaps wrongly, that the 
engine would make sure that no account would ever have two 
different Account objects, presumably by some kind of test before 
creating the second Account object..  

I do find myself wondering how one could ever be in the situation where 
two accounts are Equal, with Equal subaccounts, and even Equal splits 
except by amazing coincidence.  And then why that coincidence should be 
worth testing for.  Evidently I'm misunderstanding something here. 
 
-- hendrik


More information about the gnucash-devel mailing list