Move GStrv typedef to glib.h instead of gobject.h

GStrv was historically only needed for the boxed G_TYPE_STRV,
but it is now useful for g_auto(GStrv) as well. This is not
an ABI change.

https://bugzilla.gnome.org/show_bug.cgi?id=755355
This commit is contained in:
Xavier Claessens
2015-09-21 10:41:00 -04:00
parent 32811598f3
commit b81f3ced71
9 changed files with 22 additions and 9 deletions

View File

@@ -398,6 +398,13 @@ test_g_variant_type (void)
g_assert (val != NULL);
}
static void
test_strv (void)
{
g_auto(GStrv) val = g_strsplit("a:b:c", ":", -1);
g_assert (val != NULL);
}
int
main (int argc, gchar *argv[])
{
@@ -449,6 +456,7 @@ main (int argc, gchar *argv[])
g_test_add_func ("/autoptr/g_variant_iter", test_g_variant_iter);
g_test_add_func ("/autoptr/g_variant_dict", test_g_variant_dict);
g_test_add_func ("/autoptr/g_variant_type", test_g_variant_type);
g_test_add_func ("/autoptr/strv", test_strv);
return g_test_run ();
}