[glib: 6/8] gobject: Use new g_newa0() function
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 6/8] gobject: Use new g_newa0() function
- Date: Fri, 26 Nov 2021 12:38:47 +0000 (UTC)
commit 1529c2ca4d44d0bb82f5ea416d77dc776e90510d
Author: Nishal Kulkarni <nishalkulkarni gmail com>
Date: Thu Nov 25 16:18:00 2021 +0530
gobject: Use new g_newa0() function
Replace old `g_newa()` and `memset()` with `g_newa0()`
gobject/gobject.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index 7499d2ec4..1c95e3d0d 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2163,8 +2163,7 @@ g_object_new_with_properties (GType object_type,
params[count].pspec = pspec;
/* Init GValue */
- params[count].value = g_newa (GValue, 1);
- memset (params[count].value, 0, sizeof (GValue));
+ params[count].value = g_newa0 (GValue, 1);
g_value_init (params[count].value, G_VALUE_TYPE (&values[i]));
g_value_copy (&values[i], params[count].value);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]