glib.py: Fix Python 3 TypeError in gdb pretty-printers

https://bugzilla.gnome.org/show_bug.cgi?id=749092
This commit is contained in:
Marius Gedminas 2015-05-08 02:54:00 -04:00 committed by Olivier Crête
parent c97729532f
commit c935237e75

View File

@ -67,6 +67,8 @@ class GListPrinter:
self.count = self.count + 1 self.count = self.count + 1
return ('[%d]' % count, data) return ('[%d]' % count, data)
__next__ = next
def __init__ (self, val, listtype): def __init__ (self, val, listtype):
self.val = val self.val = val
self.listtype = listtype self.listtype = listtype
@ -121,6 +123,8 @@ class GHashPrinter:
return ('[%dk]'% (self.pos), key) return ('[%dk]'% (self.pos), key)
raise StopIteration raise StopIteration
__next__ = next
def __init__ (self, val): def __init__ (self, val):
self.val = val self.val = val
self.keys_are_strings = False self.keys_are_strings = False