From c5b7cc9598f4a9a5c7c42c1ccd06765dc17b4c24 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Thu, 14 Nov 2013 12:14:29 +0100 Subject: Add Python 3 compatibility to GDB pretty printers. GDB on *buntu is linked against Python 3.3, which has many incompatibilities to Python 2, resulting in broken code. This patch uses the Python six library as a compatibility layer. Change-Id: Icb4cc54a1d05afb119376bb5e1430c91cb794d08 Reviewed-on: https://gerrit.libreoffice.org/6688 Reviewed-by: Michael Stahl Tested-by: Michael Stahl --- solenv/gdb/boost/lib/unordered.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'solenv/gdb/boost/lib') diff --git a/solenv/gdb/boost/lib/unordered.py b/solenv/gdb/boost/lib/unordered.py index eecfa7935a8e..ee58d0481158 100644 --- a/solenv/gdb/boost/lib/unordered.py +++ b/solenv/gdb/boost/lib/unordered.py @@ -19,6 +19,7 @@ # along with this program. If not, see . import gdb +import six class Unordered(object): '''Common representation of Boost.Unordered types''' @@ -57,7 +58,7 @@ class Unordered(object): assert node_type != None return node_type - class _iterator(object): + class _iterator(six.Iterator): '''Iterator for Boost.Unordered types''' def __init__(self, first_bucket, last_bucket, node_type, extractor): @@ -71,7 +72,7 @@ class Unordered(object): def __iter__(self): return self - def next(self): + def __next__(self): if self.node: self.node = self.node.dereference()['next_'] -- cgit