aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2019-05-21 10:14:23 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-05-21 21:53:15 +0300
commit60f34a1f51d455598143c1c55fd49a5eb1bb1fd6 (patch)
tree2fba6972a1320243829af1154fee1f22650346ce
parent79d530e32509b8ccdc50a6769e8c786b3eccebd3 (diff)
downloadmeson-60f34a1f51d455598143c1c55fd49a5eb1bb1fd6.zip
meson-60f34a1f51d455598143c1c55fd49a5eb1bb1fd6.tar.gz
meson-60f34a1f51d455598143c1c55fd49a5eb1bb1fd6.tar.bz2
gnome: use g_intern_static_string() for enum/flags type names
We are emitting a static string, so use that shortcut function to intern it, which will save one allocation.
-rw-r--r--mesonbuild/modules/gnome.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 9cb0323..e20bae6 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -1415,7 +1415,7 @@ GType
c_file_kwargs['vtail'] = ''' { 0, NULL, NULL }
};
if (g_once_init_enter (&gtype_id)) {
- GType new_type = g_@type@_register_static ("@EnumName@", values);
+ GType new_type = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
g_once_init_leave (&gtype_id, new_type);
}
return (GType) gtype_id;