mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gio: use g_variant_builder_init_static()
All uses of g_variant_builder_init() in gio are safe to translate to the new g_variant_builder_init_static() alternative as the type will outlive the call to g_variant_builder_end() (or is already static in nature).
This commit is contained in:
committed by
Philip Withnall
parent
bfac590364
commit
0f95b18a7b
@@ -129,7 +129,7 @@ mock_interface_get_properties (GDBusInterfaceSkeleton *interface)
|
||||
info = g_dbus_interface_skeleton_get_info (interface);
|
||||
vtable = g_dbus_interface_skeleton_get_vtable (interface);
|
||||
|
||||
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
|
||||
g_variant_builder_init_static (&builder, G_VARIANT_TYPE ("a{sv}"));
|
||||
for (n = 0; info->properties[n] != NULL; n++)
|
||||
{
|
||||
if (info->properties[n]->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
|
||||
|
Reference in New Issue
Block a user