[glib/gobject-speedups: 14/22] 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: 14/22] Don't copy values when collecting in g_object_new
- Date: Wed, 1 Jun 2022 15:50:10 +0000 (UTC)
commit 2b20f08ed0d5e1db3392a7b6c3e583d1f6aa06ab
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 8a7b980986..97476a1f88 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2364,7 +2364,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_INIT2 (&values[n_params], vtabs[n_params], pspec->value_type, var_args, 0, &error);
+ G_VALUE_COLLECT_INIT2 (&values[n_params], vtabs[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]