mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 02:32:11 +01:00
Don't copy values when collecting in g_object_new
We can safely use the values without copying here.
This commit is contained in:
parent
4b7ce7db09
commit
2b20f08ed0
@ -2364,7 +2364,7 @@ g_object_new_valist (GType object_type,
|
|||||||
params[n_params].value = &values[n_params];
|
params[n_params].value = &values[n_params];
|
||||||
memset (&values[n_params], 0, sizeof (GValue));
|
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)
|
if (error)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user