summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-node.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2016-11-17 19:40:08 +0000
committerRichard Hughes <richard@hughsie.com>2016-11-21 15:19:55 +0000
commit56a462e8b47c283f8637f1d11c01b68dffd46ef5 (patch)
tree72a81e96633bccf772c5d1ac64a852e60a36445b /libappstream-glib/as-node.c
parentda6750f328fd099fdd1d8cde59f88c07af692514 (diff)
downloadappstream-glib-56a462e8b47c283f8637f1d11c01b68dffd46ef5.tar.gz
trivial: Add as_ref_string_new_static()
This reduces the number of common duplicate strings like 'C'.
Diffstat (limited to 'libappstream-glib/as-node.c')
-rw-r--r--libappstream-glib/as-node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libappstream-glib/as-node.c b/libappstream-glib/as-node.c
index ffbdd6b..9277f81 100644
--- a/libappstream-glib/as-node.c
+++ b/libappstream-glib/as-node.c
@@ -1657,7 +1657,7 @@ as_node_get_localized (const AsNode *node, const gchar *key)
const gchar *data_localized;
GHashTable *hash = NULL;
AsNode *tmp;
- g_autoptr(AsRefString) xml_lang_c = as_ref_string_new_copy ("C");
+ g_autoptr(AsRefString) xml_lang_c = as_ref_string_new_static ("C");
/* does it exist? */
tmp = as_node_get_child_node (node, key, NULL, NULL);
@@ -1937,7 +1937,7 @@ as_node_fix_locale (const gchar *locale)
AsRefString *tmp;
if (locale == NULL)
- return as_ref_string_new ("C");
+ return as_ref_string_new_static ("C");
if (g_strcmp0 (locale, "xx") == 0)
return NULL;
if (g_strcmp0 (locale, "x-test") == 0)