diff options
Diffstat (limited to 'lldb/examples')
-rwxr-xr-x | lldb/examples/python/performance.py | 9 | ||||
-rw-r--r-- | lldb/examples/summaries/cocoa/CFString.py | 7 |
2 files changed, 5 insertions, 11 deletions
diff --git a/lldb/examples/python/performance.py b/lldb/examples/python/performance.py index b86b5a5..c3181b6 100755 --- a/lldb/examples/python/performance.py +++ b/lldb/examples/python/performance.py @@ -16,7 +16,6 @@ import resource import sys import subprocess import time -import types # ---------------------------------------------------------------------- # Code that auto imports LLDB @@ -121,19 +120,19 @@ class BreakpointAction(Action): self.breakpoints.append(breakpoint) else: if module: - if isinstance(module, types.ListType): + if isinstance(module, list): for module_path in module: self.modules.Append(lldb.SBFileSpec(module_path, False)) - elif isinstance(module, types.StringTypes): + elif isinstance(module, str): self.modules.Append(lldb.SBFileSpec(module, False)) if name: # "file" can be a list or a string if file: - if isinstance(file, types.ListType): + if isinstance(file, list): self.files = lldb.SBFileSpecList() for f in file: self.files.Append(lldb.SBFileSpec(f, False)) - elif isinstance(file, types.StringTypes): + elif isinstance(file, str): self.files.Append(lldb.SBFileSpec(file, False)) self.breakpoints.append( self.target.BreakpointCreateByName(name, self.modules, self.files) diff --git a/lldb/examples/summaries/cocoa/CFString.py b/lldb/examples/summaries/cocoa/CFString.py index 74bd927..02b6706 100644 --- a/lldb/examples/summaries/cocoa/CFString.py +++ b/lldb/examples/summaries/cocoa/CFString.py @@ -11,11 +11,6 @@ import lldb import lldb.runtime.objc.objc_runtime import lldb.formatters.Logger -try: - unichr -except NameError: - unichr = chr - def CFString_SummaryProvider(valobj, dict): logger = lldb.formatters.Logger.Logger() @@ -107,7 +102,7 @@ class CFStringSynthProvider: value = b1 * 256 + b0 else: value = b0 * 256 + b1 - pystr = pystr + unichr(value) + pystr = pystr + chr(value) # read max_len unicode values, not max_len bytes max_len = max_len - 1 return pystr |