diff options
Diffstat (limited to 'gi/overrides/GLib.py')
-rw-r--r-- | gi/overrides/GLib.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py index ac783be..ad9f235 100644 --- a/gi/overrides/GLib.py +++ b/gi/overrides/GLib.py @@ -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): @@ -77,7 +65,7 @@ class _VariantCreator(object): if not args: raise TypeError('not enough arguments for GVariant format string') v = constructor(args[0]) - return (constructor(args[0]), format[1:], args[1:]) + return (v, format[1:], args[1:]) else: return (None, format[1:], None) |