Patch Re: Bug 625193 To move utils to core

Christian Stimming stimming at
Mon Aug 23 16:25:42 EDT 2010

Am Monday 23 August 2010 schrieb Mike Evans:
> On Monday August 23 2010 18:42:40 Geert Janssens wrote:
> > Mike,
> > 
> > I'm not too experienced in C coding, but I wonder if it's not cleaner to
> > define your general search function with an additional type parameter
> > instead of globally declaring a type variable.
> > 
> > I don't find many global variable declarations in GnuCash unless they are
> > static.
> > 
> > So my feeling is this may not be the best thing to do. Others can correct
> > me if that's totally bogus though.
> > 
> > Geert
> Hopefully a better (combined) patch.

Yes, this patch looks much better. One final thing: Currently you have 
function called "search()" declared in the gncIDSearch.h header. This name is 
too generic and prone to clash with another function declaration anywhere 
else. Either you rename this into the same naming scheme as the others (so 
that it will be a unique enough name), or (more simply) you remove the 
declaration from the header file and solely declare it in the gncIDSearch.c 
file. Usually, people would probably go for the latter solution so that the 
implementation function isn't visible to the outside, in which case the naming 
also doesn't really matter.



More information about the gnucash-devel mailing list