Another SCM bug in trunk

Derek Atkins warlord at MIT.EDU
Sat Oct 28 11:13:32 EDT 2006


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

> On Fri, Oct 27, 2006 at 09:32:42PM -0400, Derek Atkins wrote:
>> Hey,
>> 
>> I was just trying the business reports and found two bugs
>> in trunk.
>> 
>> Bug #1:
>> 
>>  [Menu] -> Reports -> Business -> Printable Invoice
>> 
>> It comes up without an invoice, but the report thinks it's
>> trying to print invoice #0 instead of printing a message
>> saying that you need to choose an invoice.
>
> Is this new or old?  I see that same behavior in trunk at 14992.

I don't see the behavior at 14992.  I pulled out 14992 and it worked
just fine for me.  I pulled out 15023 and IT worked just fine, too.

For kicks I pulled out 15024 and then I merged in 15026, 15032, 15034,
15042, and 15059 in order to fix a number of SWIG and build problems
(those patches are all clearly okay on their own).  This build failed.
The problem is clearly the swigification.

My current theory is that SWIG_NewPointerObj() returns '() instead
of #f for NULL.  All the scheme code expects to see #f for a NULL
pointer, so there is a lot of constructs like:

(if invoice 
  ...
 )

If it's really returning '() then all of these need to be changed
to:

 (if (and invoice (not (null? invoice)))
  ...
 )

and this change needs to be done EVERYWHERE!  What a royal PitA..
I've been trying to read the SWIG docs but swig.sf.net appears to be
down.

-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