Skip to content

Commit 2adc801

Browse files
author
Zachary Turner
committed
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. llvm-svn: 250710
1 parent e24ad03 commit 2adc801

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lldb/examples/summaries/cocoa/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __enter__(self):
2525

2626
def __exit__(self, a,b,c):
2727
self.exit_time = time.clock()
28-
print "It took " + str(self.exit_time - self.enter_time) + " time units to run through " + self.function + self.label
28+
print("It took " + str(self.exit_time - self.enter_time) + " time units to run through " + self.function + self.label)
2929
return False
3030

3131
class Counter:

lldb/examples/synthetic/gnu_libstdcpp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ def __init__(self, valobj):
137137
self.count = None
138138

139139
def num_children(self):
140-
if self.count == None:
141-
self.count = self.num_children_impl()
142-
return self.count
140+
if self.count == None:
141+
self.count = self.num_children_impl()
142+
return self.count
143143

144-
def num_children_impl(self):
144+
def num_children_impl(self):
145145
try:
146146
start_val = self.start.GetValueAsUnsigned(0)
147147
finish_val = self.finish.GetValueAsUnsigned(0)

0 commit comments

Comments
 (0)