Use g_autoptr(GPtrArray) instead of gs_unref_ptrarray

This commit is contained in:
Matthew Barnes committed 2015-05-06 22:07:10 -04:00
1 parent 196d983af9
commit bb231fdf74
31 files changed
+60 -61

No files matched your search

+4 -4
View File
@@ -46,7 +46,7 @@ test_mutable_tree_walk (void)
{
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
g_autoptr(GPtrArray) split_path = NULL;
GError *error = NULL;
const char *pathname = "a/b/c/d/e/f/g/i";
const char *checksum = "01234567890123456789012345678901";
@@ -84,7 +84,7 @@ test_ensure_parent_dirs (void)
{
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
g_autoptr(GPtrArray) split_path = NULL;
GError *error = NULL;
const char *pathname = "/foo/bar/baz";
const char *checksum = "01234567890123456789012345678901";
@@ -111,7 +111,7 @@ test_ensure_dir (void)
{
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
g_autoptr(GPtrArray) split_path = NULL;
GError *error = NULL;
const char *dirname = "foo";
const char *filename = "bar";
@@ -131,7 +131,7 @@ test_replace_file (void)
{
glnx_unref_object OstreeMutableTree *tree = ostree_mutable_tree_new ();
glnx_unref_object OstreeMutableTree *parent = NULL;
gs_unref_ptrarray GPtrArray *split_path = NULL;
g_autoptr(GPtrArray) split_path = NULL;
GError *error = NULL;
const char *filename = "bar";
const char *checksum = "01234567890123456789012345678901";
+1 -2
View File
@@ -34,7 +34,7 @@ test_ot_util_path_split_validate (void)
for (i = 0; paths[i]; i++)
{
GError *error = NULL;
GPtrArray *components = NULL;
g_autoptr(GPtrArray) components = NULL;
if (! ot_util_path_split_validate (paths[i], &components, &error))
{
int j;
@@ -45,7 +45,6 @@ test_ot_util_path_split_validate (void)
g_assert_null (strchr (components->pdata[i], '/'));
}
}
gs_local_ptrarray_unref (components);
}
}