[pygobject] [gi] Removed hack to avoid using GLib.Variant.new_variant.
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] [gi] Removed hack to avoid using GLib.Variant.new_variant.
- Date: Fri, 15 Apr 2011 14:03:16 +0000 (UTC)
commit af31729573de24161ee90563e5738187c749783c
Author: Sebastian Pölsterl <sebp k-d-w org>
Date: Fri Apr 15 15:58:53 2011 +0200
[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
gi/overrides/GLib.py | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/gi/overrides/GLib.py b/gi/overrides/GLib.py
index ac783be..d3ce3e0 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):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]