summaryrefslogtreecommitdiffstats
path: root/solenv/gdb/libreoffice/svl.py
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2013-11-14 12:14:29 +0100
committerMichael Stahl <mstahl@redhat.com>2013-11-15 21:03:07 +0000
commitc5b7cc9598f4a9a5c7c42c1ccd06765dc17b4c24 (patch)
tree0cf967a13cc0b3cd979f3e4b9240089752c6fb13 /solenv/gdb/libreoffice/svl.py
parentGPU Calc: revert back to OpenCL fmin and fmax (diff)
downloadcore-c5b7cc9598f4a9a5c7c42c1ccd06765dc17b4c24.tar.gz
core-c5b7cc9598f4a9a5c7c42c1ccd06765dc17b4c24.zip
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 <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'solenv/gdb/libreoffice/svl.py')
-rw-r--r--solenv/gdb/libreoffice/svl.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/solenv/gdb/libreoffice/svl.py b/solenv/gdb/libreoffice/svl.py
index 83fe60919491..31b4507777a9 100644
--- a/solenv/gdb/libreoffice/svl.py
+++ b/solenv/gdb/libreoffice/svl.py
@@ -8,6 +8,7 @@
#
import gdb
+import six
from libreoffice.util import printing
@@ -30,7 +31,7 @@ class SvArrayPrinter(object):
def display_hint(self):
return 'array'
- class _iterator(object):
+ class _iterator(six.Iterator):
def __init__(self, data, count):
self.data = data
@@ -41,7 +42,7 @@ class SvArrayPrinter(object):
def __iter__(self):
return self
- def next(self):
+ def __next__(self):
if self.pos == self.count:
raise StopIteration()