summaryrefslogtreecommitdiff
path: root/lldb/examples
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-19 17:35:02 +0000
committerZachary Turner <zturner@google.com>2015-10-19 17:35:02 +0000
commit7e30c1df567345c409a303e78118c296732c60a9 (patch)
tree147ad243afbfcfde3f59dda6911097460c5768c7 /lldb/examples
parentf6237785150940273c1afe70e46c9419745a86bc (diff)
Py3'ify some of the examples that get run at startup.
Even though these are under examples/, they actually get loaded when LLDB starts up during initialization of ScriptInterpreterPython. There's obviously some kind of layering issue here (and comments in the code even point to that as well), but for now just make them py3 compatible.
Diffstat (limited to 'lldb/examples')
-rw-r--r--lldb/examples/summaries/cocoa/metrics.py2
-rw-r--r--lldb/examples/synthetic/gnu_libstdcpp.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/lldb/examples/summaries/cocoa/metrics.py b/lldb/examples/summaries/cocoa/metrics.py
index f195498241d..6b82ff3b301 100644
--- a/lldb/examples/summaries/cocoa/metrics.py
+++ b/lldb/examples/summaries/cocoa/metrics.py
@@ -25,7 +25,7 @@ class TimeMetrics:
def __exit__(self, a,b,c):
self.exit_time = time.clock()
- print "It took " + str(self.exit_time - self.enter_time) + " time units to run through " + self.function + self.label
+ print("It took " + str(self.exit_time - self.enter_time) + " time units to run through " + self.function + self.label)
return False
class Counter:
diff --git a/lldb/examples/synthetic/gnu_libstdcpp.py b/lldb/examples/synthetic/gnu_libstdcpp.py
index cc205960506..8c11770899f 100644
--- a/lldb/examples/synthetic/gnu_libstdcpp.py
+++ b/lldb/examples/synthetic/gnu_libstdcpp.py
@@ -137,11 +137,11 @@ class StdVectorSynthProvider:
self.count = None
def num_children(self):
- if self.count == None:
- self.count = self.num_children_impl()
- return self.count
+ if self.count == None:
+ self.count = self.num_children_impl()
+ return self.count
- def num_children_impl(self):
+ def num_children_impl(self):
try:
start_val = self.start.GetValueAsUnsigned(0)
finish_val = self.finish.GetValueAsUnsigned(0)