Previously, guid_to_string had been marked deprecated with a note about
it not being thread-safe. It was much worse than "not thread safe", it
was only safe in a particular situation, and its safety was being violated
throughout the code. It was clear that users of guid_to_string did not
understand what it was purporting to do because of its varied uses. Most
uses simply treated it like a Garbage-Collected Java String (use and forget).
I actually found at least one instance where the string was being freed. (!!!)
I made the method have a particular easy-to-understand semantic: it returns
a pointer to a string which must be freed by the caller. I then tried to
track down all uses of this function and correct them. Mostly, I just changed
the usage to guid_to_string_buff with a stack-allocated string to avoid the
the malloc/free cycle.
To allocate a GUID, use guid_malloc. To allocate and construct a guid
(which is actually unique), use guid_new (and be sure to free it using
guid_free).
`new` implies some allocation. Since guid_new was actually constructing
a guid in place rather than allocating it, it makes much more sense to
call it guid_replace (or guid_construct). We went with guid_replace.
Since we're maintaining a C api, the implementation is sometimes less than
intuitive from either a C or C++ perspective. I am trying to use as much
boost as possible while making all the guarantees that the C code makes.
One function was declared deprecated because it "wasn't thread safe". This
was straightforward to repair, and is no longer marked deprecated, and there
are now two ways to convert GUID to String: passing your own character
buffer, and having one returned to you that you need to free.
MinGW declares any standard functions not part of the ISO C standard
in #ifndef __STRICT_ANSI__ blocks; Gcc defines __STRICT_ANSI__ with
-std=c++11; Pass 'ext' to the C++11 macro to get -std=gnu++ll, which allows
all those extensions we use.
The plan is to change gnc guid to use boost's guid implementation. There were
no tests for guid before, but we need them to ensure that we don't have regressions
when that work begins.
* Bug 719457 - Template for Home Mortgage Loan isn't properly nested.
* Always use the price we display to calculate the current value of an account.
* Bug 728717 - Ubuntu 14.04 - GNUcash crashes on close
* Bug 725054 - Re-numbering sub accounts crashes the program
* More fix-ups for the renumber subaccounts dialog.
* 722200 - configure script does not pick the correct am_cv_scanf version
* Python bindings. Add function gncVendorNextID, complementary to gncCustomerNextID
* Bug 730255 - Python bindings: Assigns bill entries to non-existant invoice.
* Relax requirements for booleans in invoice line.
* Add some date format checking and make sure generated dates are the correct user selected format, not always locale format.
* Fix broken win32 build; MinGW needs our strptime.
* Fix broken build on 64-bit systems
* New/revised version of the Brazilian Portuguese translation file, For version 2.6.3. Translator: Miguel Rozsas <miguel@rozsas.eng.br>
* Bug 720934 - Barcharts with many data points have overlapping x-axis labels
* Python bindings - no instance necessary anymore
Add more invariant checks for safety.
Suppress the '-' in the account-number format if the prefix is empty.
Set the value for the interval GtkSpinButton so that it won't be 0 on startup.
Fix the step-increment and page-increment property names in the builder file
so that they have an effect.
g_strdup_printf ("%s-%0*d", prefix, num_digits, interval) calls malloc()
with the number of required characters, which includes num_digits characters
for the numeric. If the interval is 0, log10(num_children * interval) is
log10(0), which returns NAN (not a number), which when cast to size_t is
MAXINT. That generates a malloc error, which crashes GnuCash.
So don't let the interval be 0.
Add a checkbox on Filter by -> Others to show (default)
or hide accounts that don't have any transactions.
If an account does not have any transactions, but it's children do
it will still be shown (unlike the zero total amount).
* Bug 610202 - gnucash silently closes when no X11/$DISPLAY is present
* added context to ambigous i18n keys for scheduled transaction add/edit dialog
* Bug 509263 Since Last Run dialog won't allow resizing of Status column
* Bug 728103 - Invoice opened does not contain the Job under circumstances
* Bug 723145 - Currency display does not respect locale
corrected the saving of the page, so that it mentions the Job as
the owner if there is a job, instead of the customer or the vendor.
modified: src/business/business-gnome/dialog-invoice.c