Commit 3b51d642 authored by Sebastian Pölsterl's avatar Sebastian Pölsterl Committed by John (J5) Palmieri
Browse files

[gi] Removed hack to avoid using GLib.Variant.new_variant.

The bug in the annotations of GLib is fixed now.
https://bugzilla.gnome.org/show_bug.cgi?id=639952
https://bugzilla.gnome.org/show_bug.cgi?id=647796
parent bb4dce14
......@@ -25,17 +25,6 @@ GLib = modules['GLib']._introspection_module
__all__ = []
def _create_variant(value):
'''Create a variant containing the variant "value".
This is usually done with the GLib.Variant.new_variant() leaf
constructor, but this is currently broken, see GNOME#639952.
'''
builder = GLib.VariantBuilder()
builder.init(variant_type_from_string('v'))
builder.add_value(value)
return builder.end()
class _VariantCreator(object):
_LEAF_CONSTRUCTORS = {
......@@ -52,8 +41,7 @@ class _VariantCreator(object):
's': GLib.Variant.new_string,
'o': GLib.Variant.new_object_path,
'g': GLib.Variant.new_signature,
#'v': GLib.Variant.new_variant,
'v': _create_variant,
'v': GLib.Variant.new_variant,
}
def _create(self, format, args):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment