gncBookMerge second draft

Neil Williams linux at
Sun Jun 20 06:36:08 EDT 2004

The doxygen docs should be a complete guide:

I've got to the start of the comparison process - all the types and objects 
and all the rules are ready. Output so far is limited:
Gnucash Version 1.9.0
Test Account: Neil's testing account
Test Account 2: Neil's second account
type label Account
Account name    Neil's testing account

Account code
Account notes   (null)
Account name    Neil's second account

Account code
Account notes   (null)

The comparison routine is very bare, I wanted to get the rest ready before 
continuing - it can currently receive all objects (although only Account is 
defined) and all types (although QOF_TYPE_STRING is the only one active).

My issues with it at the moment all centre around freeing memory. I haven't 
used g_free() or similar functions so far - it's not that much of a problem 
when running in console mode with only one object! I'd appreciate advice on 
where objects must be freed.

General views on the design, criticism, derision, laughter, all to the usual 

It compiles to a 6.7k executable.

I've also had some thoughts on making a better link between gncBookMerge and 
mergeRegister needs to be extended to include the parameter names of all 
available objects Alternatively, it could be obtained from qof_class if a 
suitable call is added to the API in the future - this would eliminate the 
need to manually update gncBookMerge.c every time an object is added, removed 
or amended.
 Possible call:
 GSList* qof_class_get_all_parameters ( QofIdType obj_name);
(basically a version of qof_class_get_parameter called without a second 
parameter and returning a GSList*)
 The full list of available objects is already available, combining the two 
will be sufficient to generate mergeRegister at run-time. 


Neil Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url :

More information about the gnucash-devel mailing list