Renaming functions (was Re: r18303 - gnucash/trunk/src - Use SWIG properly to wrap functions to free strings which need to be freed by the caller.)

Phil Longstaff plongstaff at rogers.com
Wed Sep 9 20:25:53 EDT 2009


On September 9, 2009 04:10:42 pm Derek Atkins wrote:
> Hi,
>
> Quoting Christian Stimming <stimming at tuhh.de>:
> > Am Mittwoch, 9. September 2009 20:48 schrieb Phil Longstaff:
> >> Yes, I do need to revert that change.  Thanks.  In fact,
> >> gnc_account_get_full_name() just calls xaccAccountGetFullName().
> >
> > Yes, I've seen that as well and I wondered why this is the case.
> >
> >> Any
> >> reason I shouldn't go through all of the code and change xaccAccountXXX
> >> to gnc_account_XXX (and Trans and SchedXaction and Split and ...) and
> >> give us standardized naming for 2.4?
> >
> > If you make sure you catch really all places, even those which you don't
> > compile due to your particular ./configure switches, then indeed feel
> > free to change those names.
>
> Just be careful about doing this wholesale.  There are places where
> we have both xaccFooXXX and gnc_foo_xxx functions and they perform
> different operations.  So make sure the target function does not exist
> before you rename.
>
> Also keep in mind you'll need to update the swig files, and all the scheme
> code..  and that gnc_foo_xxx is gnc-foo-xxx in scheme.
>
> I'm just concerned that this is a bit late in the 2.4 release cycle to
> do this change.  Had you proposed it before 2.3.0 then I think it would've
> been fine, but it will take time to discover broken scheme.
>
> Note that I'm not against this change, just concerned about the timing
> and want to make sure you don't shoot yourself in the foot along the way.

Yeah, you're right.  I think I will try to remove some of the deprecated 
functions and also look into xaccFooXXX/gnc_foo_xxx pairs to see what is going 
on.  The complete renaming will need to wait for 2.5.0.

Phil


More information about the gnucash-devel mailing list