anjuta r4802 - in trunk: . plugins/symbol-db



Author: mcora
Date: Wed Feb 25 22:44:02 2009
New Revision: 4802
URL: http://svn.gnome.org/viewvc/anjuta?rev=4802&view=rev

Log:
	* plugins/symbol-db/symbol-db-engine-core.c
	(sdb_engine_get_tuple_id_by_unique_name),
	(sdb_engine_get_tuple_id_by_unique_name2),
	(sdb_engine_get_tuple_id_by_unique_name3),
	(sdb_engine_get_tuple_id_by_unique_name4):
	* plugins/symbol-db/symbol-db-engine-priv.h:
	fixed #572637 â Valgrind shows some errors in symbol-db.

Modified:
   trunk/ChangeLog
   trunk/plugins/symbol-db/symbol-db-engine-core.c
   trunk/plugins/symbol-db/symbol-db-engine-priv.h

Modified: trunk/plugins/symbol-db/symbol-db-engine-core.c
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-engine-core.c	(original)
+++ trunk/plugins/symbol-db/symbol-db-engine-core.c	Wed Feb 25 22:44:02 2009
@@ -754,7 +754,7 @@
 	}
 
 	ret_value = gda_holder_take_static_value (param, param_value, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (param_value) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);		
@@ -834,7 +834,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value1, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value1) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -856,7 +856,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value2, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value2) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -929,7 +929,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value1, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value1) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -951,7 +951,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value2, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value2) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -973,7 +973,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value3, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value3) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -1048,7 +1048,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value1, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value1) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -1070,7 +1070,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value2, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value2) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -1091,7 +1091,7 @@
 	}
 	
 	ret_value = gda_holder_take_static_value (param, value3, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value3) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);
@@ -1112,7 +1112,7 @@
 	}
 
 	ret_value = gda_holder_take_static_value (param, value4, &ret_bool, NULL);	
-	if (G_VALUE_HOLDS_STRING (value4) == TRUE)
+	if (G_VALUE_HOLDS_STRING (ret_value) == TRUE)
 	{
 		if (ret_value != NULL)
 			MP_RETURN_OBJ_STR(priv, ret_value);

Modified: trunk/plugins/symbol-db/symbol-db-engine-priv.h
==============================================================================
--- trunk/plugins/symbol-db/symbol-db-engine-priv.h	(original)
+++ trunk/plugins/symbol-db/symbol-db-engine-priv.h	Wed Feb 25 22:44:02 2009
@@ -50,6 +50,7 @@
 #define MEMORY_POOL_STRING_SIZE			200
 #define MEMORY_POOL_INT_SIZE			200
 
+#define DUMMY_VOID_STRING				""
 
 #define USE_ASYNC_QUEUE
 #undef USE_ASYNC_QUEUE
@@ -61,6 +62,7 @@
 /*		DEBUG_PRINT ("lend str %p, qlength %d [-]", OUT_gvalue, g_async_queue_length (sdb_priv->mem_pool_string));*/
 
 #define MP_RETURN_OBJ_STR(sdb_priv, gvalue) \
+	g_value_set_static_string (gvalue, DUMMY_VOID_STRING); \
 	g_async_queue_push(sdb_priv->mem_pool_string, gvalue); 
 /*	DEBUG_PRINT ("return str %p, qlength %d [+]", gvalue, g_async_queue_length (sdb_priv->mem_pool_string));*/
 
@@ -76,8 +78,11 @@
 		OUT_gvalue = (GValue*)g_queue_pop_head(sdb_priv->mem_pool_string); 
 
 #define MP_RETURN_OBJ_STR(sdb_priv, gvalue) \
+	g_value_set_static_string (gvalue, DUMMY_VOID_STRING); \
 	g_queue_push_head(sdb_priv->mem_pool_string, gvalue); 
 
+
+
 #define MP_LEND_OBJ_INT(sdb_priv, OUT_gvalue) \
 		OUT_gvalue = (GValue*)g_queue_pop_head(sdb_priv->mem_pool_int); 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]