Questions about GObjectification in GnuCash

David Hampton gnucash at
Fri Jun 1 13:13:51 EDT 2007

On Fri, 2007-06-01 at 12:05 -0400, Derek Atkins wrote:

> > Does any one know why QofInstance's functions use gpointer instead of
> > QofInstance* ?
> Um, probably because they haven't been fixed, yet?  Yes, they
> should use QofInstance.

The changes I committed were designed after functions like
g_object_get/set/ref/unref that uses the gpointer style of argument
passing.  It made more sense to me, as using a QofInstance parameter
would require casing on every single call to these functions cluttering
up the code, and the casting does absolutely nothing at compile time
except disable compiler checking, same as using a gpointer argument.
The real checks to insure the argument is correct happen at runtime when
the arguments are checked inside of the functions with a call to

> > What about string based type system?
> EVENTUALLY we might want to change this, but again this is
> something that doesn't have to change right away.  Right now
> there's a duplication here, there's the string type name and
> the GObject type name/number.  We would need to change the way
> we define types in QOF before we could completely get rid of
> the string types.

I've looked at this, and its embedded quite deeply in the code.  It can
probably be removed, but it will be tedious work.  I though the effort
too much to do before the release of 2.2.


More information about the gnucash-devel mailing list