Revert Linas' broken changes to qof.

Linas Vepstas linas at
Mon Apr 19 11:17:02 EDT 2004

On Mon, Apr 19, 2004 at 10:17:11AM -0400, Derek Atkins was heard to remark:
> linas at (Linas Vepstas) writes:
> > Uhh, except for QOF_TYPE_DOUBLE which bombs because a double
> > doesn't fit into the default 32-bit return value.  So we already
> > have a (far more serious) problem there, which we haven't seen 
> > only because I don't think we use QOF_TYPE_DOUBLE anywhere.
> I really would like to deprecate DOUBLE if at all possible.  (It may
> not be possible).  Where in the code are DOUBLE's used?  _can_ we
> "deprecate" them (and by deprecate I mean "rip them out")?

Yes. I looked once, its used in various weird places.  I think
reports, mostly.  No matter, QOF_TYPE_DOUBLE is needed in principle, 
as there are now other users ;-)

> Perhaps I did a disservice by overloading getters that return other
> objects with getters that return parameter data?

No, the only problem was of passing around function pointers without
also passing around a user-defined data pointer.

> Could you perhaps explain why you need to pass the QofParam into the
> getter function?  Are you trying to overload getters so you only need
> to implement one function capable of returning multiple parameters?

Yes, more-or-less.  I really had wanted 'lambda'.

> It DOES mean you need to change EVERY object definition in GnuCash and
> no longer directly reference the xaccFooGetBar() functions, but you
> already seem inclined to this change.  

Yeah, well, I was disinclined till you complained.  I'm still convinced
its safe.

> Well, checking in non-working code that doesn't build is generally a

Well, it did work for me :-) It even passed 'make check'.  
I even found & fixed a null pointer deref when testing with gnucash.
Just blew up a late-night half-asleep doing-three-things-at-once checkin.
Please don't lecture me, I know what I'm doing. 

> you're done.  I'm certainly considering this approach when I go heads
> down into the move from XML->SQL as the default "file" format.

Uhh, everything I'm doing right now is to get to that goal.  I'm
taking my time because I want to do it in an architecturally pure
fashion that is acceptable to other projects as well, not just gnucash.
So hang on just a bit longer.

(I'm doing all of the prototyping outside of gnucash, so that I have
a simpler environment to work with.  Also, less churn in gnucash, and
less chances of bad cvs checkins).


pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas at>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933

More information about the gnucash-devel mailing list