diff options
Diffstat (limited to 'JavaScriptCore/wtf/gobject/GRefPtr.cpp')
-rw-r--r-- | JavaScriptCore/wtf/gobject/GRefPtr.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/JavaScriptCore/wtf/gobject/GRefPtr.cpp b/JavaScriptCore/wtf/gobject/GRefPtr.cpp index e7cf34b..9d16cb5 100644 --- a/JavaScriptCore/wtf/gobject/GRefPtr.cpp +++ b/JavaScriptCore/wtf/gobject/GRefPtr.cpp @@ -35,4 +35,18 @@ template <> void derefGPtr(GHashTable* ptr) g_hash_table_unref(ptr); } +#if GLIB_CHECK_VERSION(2, 24, 0) +template <> GVariant* refGPtr(GVariant* ptr) +{ + if (ptr) + g_variant_ref(ptr); + return ptr; +} + +template <> void derefGPtr(GVariant* ptr) +{ + g_variant_unref(ptr); +} +#endif + } // namespace WTF |