[glib/gobject-speedups: 9/23] Don't copy values when collecting in g_object_new
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/gobject-speedups: 9/23] Don't copy values when collecting in g_object_new
- Date: Fri, 20 May 2022 02:08:22 +0000 (UTC)
commit 6aa43ccec648bd5302b4f597ab9b54549458a219
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 14 23:27:54 2022 -0400
Don't copy values when collecting in g_object_new
We can safely use the values without copying here.
gobject/gobject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index b9f4561a8e..54386f5692 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2365,7 +2365,7 @@ g_object_new_valist (GType object_type,
params[n_params].value = &values[n_params];
memset (&values[n_params], 0, sizeof (GValue));
- G_VALUE_COLLECT_INIT (&values[n_params], pspec->value_type, var_args, 0, &error);
+ G_VALUE_COLLECT_INIT (&values[n_params], pspec->value_type, var_args, G_VALUE_NOCOPY_CONTENTS,
&error);
if (error)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]