r18295 - gnucash/trunk/src - Fix more valgrind problems
Derek Atkins
warlord at MIT.EDU
Tue Sep 8 10:03:44 EDT 2009
Phil,
Phil Longstaff <plongstaff at code.gnucash.org> writes:
[snip]
> +/**
> + * Returns the account full name. Unlike xaccAccountGetFullName(), the
> + * string returned must *NOT* be freed.
> + *
> + * @param account Account
> + * @return Account full name
> + */
Moreover this function is no longer thread-safe at all, as it uses
static data. So you must be sure to copy out the results before anyone
else calls it.
Any reason not to change the API to have the caller supply the data?
Why the arbitrary 1000 char limit?
-derek
--
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-devel
mailing list