Bug 798585 - segfault running sample script

The root cause of which is that on recent releases of GLib (recent
meaning 2.66 in the current Debian stable!) g_type_instance_get_private
looks in the wrong place for the private data. When running the script
in question it returned NULL and since the code didn't check for a valid
pointer, it crashed.

So this change replaces all calls to g_type_instance_get_private with
the function [type_prefix]_get_instance_private() added in glib-2.36
except for two register2 files that have been removed from master; those
are ignored to avoid unnecessary merge conflicts.
This commit is contained in:
John Ralls committed 2022-07-30 16:50:51 -07:00
1 parent 815eeb496f
commit 688832b5f8
63 files changed
+93 -87

No files matched your search

@@ -171,7 +171,7 @@ try:
invoice_customer.ApplyPayment(None, a6, GncNumeric(7,100),
GncNumeric(1), datetime.date.today(), "", "")
vendor_bill_returns = book.BillLoookupByID("7")
vendor_bill_returns = book.BillLookupByID("7")
assert( vendor_bill_returns.GetID() == "7" )
vendor_extract = vendor_bill_returns.GetOwner()
assert( vendor_extract.GetName() == new_vendor.GetName() )