diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2022-06-24 11:56:29 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2022-06-24 11:56:29 +0800 |
commit | 4856166c21e96c7118de1055feb51f20bd7a6f40 (patch) | |
tree | 679765e71122b17acf3e79236f085579687cfa90 /testsuite | |
parent | 61b5a546cc6792c0766ef7a095409c67c5de218d (diff) | |
download | gtksourceview-4856166c21e96c7118de1055feb51f20bd7a6f40.tar.gz |
test-snippets.c: Fix build on Visual Studio
There is sadly no support for g_autoptr() on Visual Studio at this time.
Hopefully things will change if Jussi's proposal gets accepted eventually[1].
[1]: https://developercommunity.visualstudio.com/t/add-support-for-gcc-like-cleanup-attribute-for-pla/1187001
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/test-snippets.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/test-snippets.c b/testsuite/test-snippets.c index 36112622..f30d3ca7 100644 --- a/testsuite/test-snippets.c +++ b/testsuite/test-snippets.c @@ -71,11 +71,13 @@ test_snippet_fetching (void) /* Test language id for snippets */ for (guint i = 0; i < n_items; i++) { - g_autoptr(GtkSourceSnippet) snippet = g_list_model_get_item (model, i); + GtkSourceSnippet *snippet = g_list_model_get_item (model, i); const char *language_id = gtk_source_snippet_get_language_id (snippet); g_assert_nonnull (language_id); g_assert_cmpstr (language_id, !=, ""); + + g_object_unref (snippet); } g_assert_finalize_object (mgr); |