Transaction and register reports don't work in swig version

Chris Shoemaker c.shoemaker at cox.net
Thu Oct 19 20:07:10 EDT 2006


On Thu, Oct 19, 2006 at 05:50:52PM -0400, Mike Alexander wrote:
> I found a couple more errors in the swig versions of the transaction 
> and register reports.  The patches below make them work better.  I'm 
> not suggesting that this is the correct fix, but rather I'm sending 
> this to document the problems.
> 
> Probably because of the order of the renames in the sed script (is that 
> script available, by the way?) 

It's in the commit message for each commit in which it was applied.  I
figured it was worth recording but not worth committing.

> gnc:query-get-splits-unique-trans was 
> renamed to qof-query-run-unique-trans and it seems to be called 
> xaccQueryGetSplitsUniqueTrans now.  Also 
> gnc:split-corr-account-fullname was renamed to SPLIT-CORR-ACCT-FULLNAME 
> and it looks like it should be SPLIT-CORR-ACCT-NAME.

Yup and yup.

> 
> These are both trivial, but a more interesting problem is that 
> xaccTransGetSplit returns '() instead of #f when the index is greater 
> than the number of splits in the transaction.  This broke both 
> transaction.scm and register.scm.  I presume the better fix is to 
> change xaccTransGetSplit to return #f in this case, but I'm not sure 
> how to do that so I patched the caller to work with either.

Any time a wrapped C function returns NULL, the guile value should now
be checked with (null? ...).  This also needed to be changed in
engine/engine-interface.scm.

Thanks, Mike, committed in 15046.

-chris


More information about the gnucash-devel mailing list