[Gnucash-changes] r12197 - gnucash/trunk/src/engine - remove random qof_commit_edit from xaccSplitSetSlots_nc

Derek Atkins warlord at MIT.EDU
Thu Dec 29 10:53:09 EST 2005


Chris Shoemaker <c.shoemaker at cox.net> writes:

> On Thu, Dec 29, 2005 at 12:27:21AM -0500, Derek Atkins wrote:
>> If it's unbalanced, the proper fix here is to add a begin_edit,
>> not to remove the commit_edit.
>
> Nope.  SplitSetters don't do their own begin/commit.  It's a
> bug.
>
> -chris

I just looked at the code in question and I rescind my complaint.
However, not because of your argument.  Your argument is still
incorrect, even if the conclusion is correct.  The reason you don't
need the begin/commit() in this function is because it calls
check_open(), meaning that it's already checking that the caller has
the transaction open for editing.  Because it's already checking then
we don't need to do it ourselves.

-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