[gobject-introspection] Use g_free as element_free_func
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Use g_free as element_free_func
- Date: Sun, 5 Feb 2012 10:44:06 +0000 (UTC)
commit c9dc7a1fa2c4c5fa8b25780ebac06e4df0c428d7
Author: Sebastian PÃlsterl <sebp k-d-w org>
Date: Sun Feb 5 11:41:12 2012 +0100
Use g_free as element_free_func
The elements of the GPtrArray are of type char*, therefore use
g_free rather than g_object_unref to as element_free_func
tests/scanner/regress.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tests/scanner/regress.c b/tests/scanner/regress.c
index 3b0fc50..8fd210e 100644
--- a/tests/scanner/regress.c
+++ b/tests/scanner/regress.c
@@ -1327,7 +1327,7 @@ regress_test_garray_container_return (void)
{
GPtrArray *array;
- array = g_ptr_array_new_with_free_func (g_object_unref);
+ array = g_ptr_array_new_with_free_func (g_free);
g_ptr_array_add (array, g_strdup ("regress"));
return array;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]