New QOF type, QOF_TYPE_COLLECT and recursive entity copying

Derek Atkins warlord at MIT.EDU
Mon May 9 16:46:29 EDT 2005


Neil,

A couple of comments on this patch.  I'll note that I haven't looked very
closely at it, but in my cursory examination I see a number of issues:

1) You introduce a number of memory leaks.  For example, when you just reset the
address pointer to a passed-in object you potentially leak memory.  You need to
first check if the pointer is already set, make sure it's not the same pointer,
and then destroy the old object before resetting it.  You have similar issues
in  places like qofOwnerGetType() where I really don't think you should be
returning g_strdup'd strings when the data is constant.

2) You add a number of APIs that really don't belong.  There is absolutely no
reason to export the invoices list of entries as a QofCollection (or a KVP
frame).  I'd be less concerned if this were a private API -- but it certainly
does not belong in the .h file and exported from the module.

3) I don't see why you need a "qof_temp" storage in the GncOwner object.  It
seems superfluous.

4) You change a lot of style structure which makes it harder to read your
patches.  :)

-derek

Quoting Neil Williams <codehelp at cvs.gnucash.org>:

> Log Message:
> -----------
> New QOF type, QOF_TYPE_COLLECT and recursive entity copying
> 
> Tags:
> ----
> gnucash-gnome2-dev
> 
> Modified Files:
> --------------
>     gnucash:
>         ChangeLog
>     gnucash/src/backend/file/test:
>         .cvsignore
>     gnucash/src/backend/qsf:
>         qsf-backend.c
>     gnucash/src/business/business-core:
>         gncAddress.c
>         gncAddress.h
>         gncCustomer.c
>         gncCustomer.h
>         gncInvoice.c
>         gncInvoice.h
>         gncOwner.c
>         gncOwner.h
>     gnucash/src/business/business-gnome:
>         gnc-plugin-business.c
>     gnucash/src/engine:
>         kvp_frame.h
>         qof_book_merge.c
>         qofclass.h
>         qofid.c
>         qofid.h
>         qofsession.c
>         qofsession.h
> _______________________________________________
> gnucash-patches mailing list
> gnucash-patches at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-patches
> 


-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-patches mailing list