[glib/gobject-speedup5: 2/2] Don't copy values during g_object_set
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/gobject-speedup5: 2/2] Don't copy values during g_object_set
- Date: Wed, 1 Jun 2022 22:23:20 +0000 (UTC)
commit 95caffcd260457c488136cd4a922adead4df6cfe
Author: Matthias Clasen <mclasen redhat com>
Date: Sun May 15 07:55:22 2022 -0400
Don't copy values during g_object_set
It is safe not to copy arguments here,
because we are not emitting any signals
before we are done setting the values
as properties.
This matches what we do for g_object_new now.
gobject/gobject.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gobject/gobject.c b/gobject/gobject.c
index aa5dac3ad5..fa161cbf4a 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -2582,7 +2582,7 @@ g_object_set_valist (GObject *object,
if (!g_object_set_is_valid_property (object, pspec, name))
break;
- G_VALUE_COLLECT_INIT2 (&value, vtab, pspec->value_type, var_args, 0, &error);
+ G_VALUE_COLLECT_INIT2 (&value, vtab, pspec->value_type, var_args, G_VALUE_NOCOPY_CONTENTS, &error);
if (error)
{
g_warning ("%s: %s", G_STRFUNC, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]