r18700 - gnucash/trunk/src - Build fixes for EL5 after glib 2.12 requirement
Geert Janssens
gjanssens at code.gnucash.org
Sat Feb 20 19:28:00 EST 2010
Author: gjanssens
Date: 2010-02-20 19:27:59 -0500 (Sat, 20 Feb 2010)
New Revision: 18700
Trac: http://svn.gnucash.org/trac/changeset/18700
Modified:
gnucash/trunk/src/gnome-utils/gtktreedatalist.c
gnucash/trunk/src/libqof/qof/guid.c
Log:
Build fixes for EL5 after glib 2.12 requirement
Modified: gnucash/trunk/src/gnome-utils/gtktreedatalist.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gtktreedatalist.c 2010-02-20 22:01:05 UTC (rev 18699)
+++ gnucash/trunk/src/gnome-utils/gtktreedatalist.c 2010-02-21 00:27:59 UTC (rev 18700)
@@ -27,11 +27,6 @@
//CAS:#include "gtkalias.h"
#include <string.h>
-#ifndef HAVE_GLIB29
-static GMemChunk *tree_chunk = NULL;
-#define TREE_CHUNK_PREALLOCS 64
-#endif
-
/* node allocation
*/
GtkTreeDataList *
@@ -39,19 +34,8 @@
{
GtkTreeDataList *list;
-#ifdef HAVE_GLIB29
list = g_slice_new0 (GtkTreeDataList);
-#else /* !HAVE_GLIB29 */
- if (tree_chunk == NULL)
- tree_chunk = g_mem_chunk_new ("treedatalist mem chunk",
- sizeof (GtkTreeDataList),
- sizeof (GtkTreeDataList) * TREE_CHUNK_PREALLOCS,
- G_ALLOC_AND_FREE);
- list = g_chunk_new (GtkTreeDataList, tree_chunk);
- memset (list, 0, sizeof (GtkTreeDataList));
-#endif
-
return list;
}
@@ -74,11 +58,7 @@
else if (g_type_is_a (column_headers [i], G_TYPE_BOXED) && tmp->data.v_pointer != NULL)
g_boxed_free (column_headers [i], (gpointer) tmp->data.v_pointer);
-#ifdef HAVE_GLIB29
g_slice_free (GtkTreeDataList, tmp);
-#else /* !HAVE_GLIB29 */
- g_mem_chunk_free (tree_chunk, tmp);
-#endif
i++;
tmp = next;
}
Modified: gnucash/trunk/src/libqof/qof/guid.c
===================================================================
--- gnucash/trunk/src/libqof/qof/guid.c 2010-02-20 22:01:05 UTC (rev 18699)
+++ gnucash/trunk/src/libqof/qof/guid.c 2010-02-21 00:27:59 UTC (rev 18700)
@@ -56,9 +56,6 @@
/* Static global variables *****************************************/
static gboolean guid_initialized = FALSE;
static struct md5_ctx guid_context;
-#ifndef HAVE_GLIB29
-static GMemChunk *guid_memchunk = NULL;
-#endif
/* This static indicates the debugging module that this .o belongs to. */
static QofLogModule log_module = QOF_MOD_ENGINE;
@@ -85,7 +82,6 @@
/* Memory management routines ***************************************/
-#ifdef HAVE_GLIB29
GUID *
guid_malloc (void)
{
@@ -100,44 +96,9 @@
g_slice_free(GUID, guid);
}
-#else /* !HAVE_GLIB29 */
-static void
-guid_memchunk_init (void)
-{
- if (!guid_memchunk)
- guid_memchunk = g_mem_chunk_create (GUID, 512, G_ALLOC_AND_FREE);
-}
-static void
-guid_memchunk_shutdown (void)
-{
- if (guid_memchunk)
- {
- g_mem_chunk_destroy (guid_memchunk);
- guid_memchunk = NULL;
- }
-}
-
GUID *
-guid_malloc (void)
-{
- if (!guid_memchunk) guid_memchunk_init();
- return g_chunk_new (GUID, guid_memchunk);
-}
-
-void
-guid_free (GUID *guid)
-{
- if (!guid)
- return;
-
- g_chunk_free (guid, guid_memchunk);
-}
-#endif
-
-
-GUID *
guid_copy (const GUID *guid)
{
GUID *copy;
@@ -510,9 +471,6 @@
void
guid_shutdown (void)
{
-#ifndef HAVE_GLIB29
- guid_memchunk_shutdown();
-#endif
}
#define GUID_PERIOD 5000
More information about the gnucash-changes
mailing list