Don't copy values during g_object_set

It is safe not to copy arguments when we are
setting properties. This matches what we do
for g_object_new now.
This commit is contained in:
Matthias Clasen 2022-05-15 07:55:22 -04:00
parent 2b20f08ed0
commit 880cd6811b

View File

@ -2557,7 +2557,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);