r15003 - gnucash/branches/swig-redo - Replace some malloc's by g_malloc.

Andreas Köhler andi5 at cvs.gnucash.org
Tue Oct 10 20:44:33 EDT 2006


Author: andi5
Date: 2006-10-10 20:44:31 -0400 (Tue, 10 Oct 2006)
New Revision: 15003
Trac: http://svn.gnucash.org/trac/changeset/15003

Modified:
   gnucash/branches/swig-redo/
   gnucash/branches/swig-redo/src/gnome-utils/gnc-main-window.c
   gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-account.c
   gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-commodity.c
   gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-price.c
Log:
Replace some malloc's by g_malloc.



Property changes on: gnucash/branches/swig-redo
___________________________________________________________________
Name: svk:merge
   - 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/swig-redo:772
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:12971
   + 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/swig-redo:774
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:12971

Modified: gnucash/branches/swig-redo/src/gnome-utils/gnc-main-window.c
===================================================================
--- gnucash/branches/swig-redo/src/gnome-utils/gnc-main-window.c	2006-10-11 00:39:44 UTC (rev 15002)
+++ gnucash/branches/swig-redo/src/gnome-utils/gnc-main-window.c	2006-10-11 00:44:31 UTC (rev 15003)
@@ -778,7 +778,7 @@
   /* Save page ordering within the notebook. Use +1 notation so the
    * numbers in the page order match the page sections, at least for
    * the one window case. */
-  order = malloc(sizeof(gint) * num_pages);
+  order = g_malloc(sizeof(gint) * num_pages);
   for (i = 0; i < num_pages; i++) {
     gpointer page = g_list_nth_data(priv->usage_order, i);
     order[i] = g_list_index(priv->installed_pages, page) + 1;

Modified: gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-account.c
===================================================================
--- gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-account.c	2006-10-11 00:39:44 UTC (rev 15002)
+++ gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-account.c	2006-10-11 00:44:31 UTC (rev 15003)
@@ -330,7 +330,7 @@
 
   string = g_static_private_get (&gtmits_buffer_key);
   if (string == NULL) {
-    string = malloc(ITER_STRING_LEN + 1);
+    string = g_malloc(ITER_STRING_LEN + 1);
     g_static_private_set (&gtmits_buffer_key, string, g_free);
   }
 #else

Modified: gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-commodity.c
===================================================================
--- gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-commodity.c	2006-10-11 00:39:44 UTC (rev 15002)
+++ gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-commodity.c	2006-10-11 00:44:31 UTC (rev 15003)
@@ -305,7 +305,7 @@
 
   string = g_static_private_get (&gtmits_buffer_key);
   if (string == NULL) {
-    string = malloc(ITER_STRING_LEN + 1);
+    string = g_malloc(ITER_STRING_LEN + 1);
     g_static_private_set (&gtmits_buffer_key, string, g_free);
   }
 #else
@@ -1256,7 +1256,7 @@
 	    return;
 	  }
 
-	  data = malloc(sizeof(*data));
+	  data = g_malloc(sizeof(*data));
 	  data->model = model;
 	  data->path = path;
 	  pending_removals = g_slist_append (pending_removals, data);

Modified: gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-price.c
===================================================================
--- gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-price.c	2006-10-11 00:39:44 UTC (rev 15002)
+++ gnucash/branches/swig-redo/src/gnome-utils/gnc-tree-model-price.c	2006-10-11 00:44:31 UTC (rev 15003)
@@ -361,7 +361,7 @@
 
   string = g_static_private_get (&gtmits_buffer_key);
   if (string == NULL) {
-    string = malloc(ITER_STRING_LEN + 1);
+    string = g_malloc(ITER_STRING_LEN + 1);
     g_static_private_set (&gtmits_buffer_key, string, g_free);
   }
 #else
@@ -1515,7 +1515,7 @@
 	    return;
 	  }
 
-	  data = malloc(sizeof(*data));
+	  data = g_malloc(sizeof(*data));
 	  data->model = model;
 	  data->path = path;
 	  pending_removals = g_slist_append (pending_removals, data);



More information about the gnucash-changes mailing list