[anjuta/sdb-core-trans] symbol-db: code cleaning. Use only GQueue and not GAsyncQueue.
- From: Massimo Cora' <mcora src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/sdb-core-trans] symbol-db: code cleaning. Use only GQueue and not GAsyncQueue.
- Date: Sun, 20 Jun 2010 23:06:34 +0000 (UTC)
commit 56001e0f77a1f78e1be057b518a531264a87951c
Author: Massimo Corà <mcora src gnome org>
Date: Mon Jun 21 00:35:31 2010 +0200
symbol-db: code cleaning. Use only GQueue and not GAsyncQueue.
plugins/symbol-db/symbol-db-engine-core.c | 20 --------------------
plugins/symbol-db/symbol-db-engine-priv.h | 25 -------------------------
2 files changed, 0 insertions(+), 45 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-engine-core.c b/plugins/symbol-db/symbol-db-engine-core.c
index 461c872..ad3fd5d 100644
--- a/plugins/symbol-db/symbol-db-engine-core.c
+++ b/plugins/symbol-db/symbol-db-engine-core.c
@@ -2253,13 +2253,8 @@ sdb_engine_init (SymbolDBEngine * object)
NULL);
/* init memory pool object for GValue strings */
-#ifdef USE_ASYNC_QUEUE
- sdbe->priv->mem_pool_string = g_async_queue_new_full (g_free);
- sdbe->priv->mem_pool_int = g_async_queue_new_full (g_free);
-#else
sdbe->priv->mem_pool_string = g_queue_new ();
sdbe->priv->mem_pool_int = g_queue_new ();
-#endif
for (i = 0; i < MEMORY_POOL_STRING_SIZE; i++)
{
@@ -2267,11 +2262,7 @@ sdb_engine_init (SymbolDBEngine * object)
g_value_init (value, G_TYPE_STRING);
g_value_set_static_string (value, MP_VOID_STRING);
-#ifdef USE_ASYNC_QUEUE
- g_async_queue_push (sdbe->priv->mem_pool_string, value);
-#else
g_queue_push_head (sdbe->priv->mem_pool_string, value);
-#endif
}
for (i = 0; i < MEMORY_POOL_INT_SIZE; i++)
@@ -2279,11 +2270,7 @@ sdb_engine_init (SymbolDBEngine * object)
GValue *value = g_slice_new0 (GValue);
g_value_init (value, G_TYPE_INT);
-#ifdef USE_ASYNC_QUEUE
- g_async_queue_push (sdbe->priv->mem_pool_int, value);
-#else
g_queue_push_head (sdbe->priv->mem_pool_int, value);
-#endif
}
}
@@ -2418,12 +2405,6 @@ sdb_engine_finalize (GObject * object)
g_tree_destroy (priv->file_symbols_cache);
-#ifdef USE_ASYNC_QUEUE
- g_async_queue_unref (priv->mem_pool_string);
- g_async_queue_unref (priv->mem_pool_int);
- priv->mem_pool_string = NULL;
- priv->mem_pool_int = NULL;
-#else
g_queue_foreach (priv->mem_pool_string, (GFunc)sdb_engine_gvalue_free, NULL);
g_queue_free (priv->mem_pool_string);
@@ -2432,7 +2413,6 @@ sdb_engine_finalize (GObject * object)
priv->mem_pool_string = NULL;
priv->mem_pool_int = NULL;
-#endif
g_free (priv);
diff --git a/plugins/symbol-db/symbol-db-engine-priv.h b/plugins/symbol-db/symbol-db-engine-priv.h
index ec91ee5..2035884 100644
--- a/plugins/symbol-db/symbol-db-engine-priv.h
+++ b/plugins/symbol-db/symbol-db-engine-priv.h
@@ -55,9 +55,6 @@
#define DUMMY_VOID_STRING ""
#define MP_VOID_STRING "-"
-#define USE_ASYNC_QUEUE
-#undef USE_ASYNC_QUEUE
-
#define MP_RESET_OBJ_STR(gvalue) \
g_value_set_static_string (gvalue, DUMMY_VOID_STRING);
@@ -76,22 +73,6 @@
} \
}
-#ifdef USE_ASYNC_QUEUE
-#define MP_LEND_OBJ_STR(sdb_priv, OUT_gvalue) \
- OUT_gvalue = (GValue*)g_async_queue_pop(sdb_priv->mem_pool_string); \
- MP_RESET_OBJ_STR(OUT_gvalue);
-
-#define MP_RETURN_OBJ_STR(sdb_priv, gvalue) \
- g_value_set_static_string (gvalue, MP_VOID_STRING); \
- g_async_queue_push(sdb_priv->mem_pool_string, gvalue);
-
-#define MP_LEND_OBJ_INT(sdb_priv, OUT_gvalue) \
- OUT_gvalue = (GValue*)g_async_queue_pop(sdb_priv->mem_pool_int);
-
-#define MP_RETURN_OBJ_INT(sdb_priv, gvalue) \
- g_async_queue_push(sdb_priv->mem_pool_int, gvalue);
-
-#else
#define MP_LEND_OBJ_STR(sdb_priv, OUT_gvalue) \
OUT_gvalue = (GValue*)g_queue_pop_head(sdb_priv->mem_pool_string); \
MP_RESET_OBJ_STR(OUT_gvalue);
@@ -105,7 +86,6 @@
#define MP_RETURN_OBJ_INT(sdb_priv, gvalue) \
g_queue_push_head(sdb_priv->mem_pool_int, gvalue);
-#endif
/* ret_value, even if not used outside, permits variable reusing without
* forcing the compiler to redeclare it everytime
@@ -266,13 +246,8 @@ struct _SymbolDBEnginePriv
static_query_node *static_query_list[PREP_QUERY_COUNT];
-#ifdef USE_ASYNC_QUEUE
- GAsyncQueue *mem_pool_string;
- GAsyncQueue *mem_pool_int;
-#else
GQueue *mem_pool_string;
GQueue *mem_pool_int;
-#endif
#ifdef DEBUG
GTimer *first_scan_timer_DEBUG;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]