rpms/gnucash/devel gnucash-2.2.7-glib2-int-key.patch, NONE, 1.1 gnucash.spec, 1.93, 1.94

Bill Nottingham notting at fedoraproject.org
Fri Dec 5 15:03:40 UTC 2008


Author: notting

Update of /cvs/extras/rpms/gnucash/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29658

Modified Files:
	gnucash.spec 
Added Files:
	gnucash-2.2.7-glib2-int-key.patch 
Log Message:
Fix crash with glib-2.19. (#474511, <jik at brookline.ma.us>)


gnucash-2.2.7-glib2-int-key.patch:

--- NEW FILE gnucash-2.2.7-glib2-int-key.patch ---
--- src/register/register-gnome/gnucash-sheet.c~	2008-01-07 20:05:28.000000000 -0500
+++ src/register/register-gnome/gnucash-sheet.c	2008-12-04 16:01:47.000000000 -0500
@@ -2367,7 +2367,8 @@
         sheet->width = 0;
         sheet->height = 0;
 
-        sheet->cursor_styles = g_hash_table_new (g_str_hash, g_str_equal);
+        sheet->cursor_styles = g_hash_table_new_full (g_str_hash, g_str_equal,
+						      g_free, NULL);
 
         sheet->blocks = g_table_new (sizeof (SheetBlock),
                                      gnucash_sheet_block_construct,
@@ -2426,8 +2427,9 @@
         sheet->grid = item;
 
         /* some register data */
-        sheet->dimensions_hash_table = g_hash_table_new (g_int_hash,
-                                                         g_int_equal);
+        sheet->dimensions_hash_table = g_hash_table_new_full (g_int_hash,
+							      g_int_equal,
+							      g_free, NULL);
 
         /* The cursor */
         sheet->cursor = gnucash_cursor_new (sheet_group);
--- src/register/register-gnome/gnucash-style.c~	2008-12-04 14:59:49.000000000 -0500
+++ src/register/register-gnome/gnucash-style.c	2008-12-04 16:01:47.000000000 -0500
@@ -48,6 +48,15 @@
         return &key;
 }
 
+static gpointer
+style_create_key (SheetBlockStyle *style)
+{
+        static gint key;
+
+        key = style->cursor->num_rows;
+
+        return g_memdup(&key, sizeof(key));
+}
 
 static void
 cell_dimensions_construct (gpointer _cd, gpointer user_data)
@@ -103,7 +112,7 @@
         if (!dimensions) {
                 dimensions = style_dimensions_new (style);
                 g_hash_table_insert (sheet->dimensions_hash_table,
-                                     style_get_key (style), dimensions);
+                                     style_create_key (style), dimensions);
         }
 
         dimensions->refcount++;


Index: gnucash.spec
===================================================================
RCS file: /cvs/extras/rpms/gnucash/devel/gnucash.spec,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- gnucash.spec	24 Nov 2008 16:08:30 -0000	1.93
+++ gnucash.spec	5 Dec 2008 15:03:10 -0000	1.94
@@ -15,7 +15,8 @@
 BuildRequires: libofx-devel, aqbanking-devel, guile-devel
 BuildRequires: desktop-file-utils, texinfo
 BuildRequires: gettext, slib >= 3a1-5, libtool, intltool
-Patch: gnucash-quiet.patch
+Patch0: gnucash-quiet.patch
+Patch1: gnucash-2.2.7-glib2-int-key.patch
 Requires: gnucash-docs >= 2.2.0
 Requires: slib >= 3a1-5
 Requires: perl(Finance::Quote)
@@ -36,7 +37,8 @@
 
 %prep
 %setup -q
-%patch -p1
+%patch0 -p1
+%patch1 -p0
 find src/quotes -name "*.in" -exec sed -i "s|use lib '@-PERLINCL-@';||g" {} \;
 
 %build
@@ -128,6 +130,9 @@
 %doc doc/README.german doc/README.francais doc/guile-hackers.txt
 
 %changelog
+* Fri Dec  5 2008 Bill Nottingham <notting at redhat.com> - 2.2.7-2
+- fix crash with glib-2.19 (#474511, <jik at kamens.brookline.ma.us>)
+
 * Tue Sep 30 2008 Bill Nottingham <notting at redhat.com> - 2.2.7-1
 - update to 2.2.7
  




More information about the fedora-extras-commits mailing list