diff options
Diffstat (limited to 'lldb/scripts/Python/modify-python-lldb.py')
-rw-r--r-- | lldb/scripts/Python/modify-python-lldb.py | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/lldb/scripts/Python/modify-python-lldb.py b/lldb/scripts/Python/modify-python-lldb.py index cb911ee..20f5ddd 100644 --- a/lldb/scripts/Python/modify-python-lldb.py +++ b/lldb/scripts/Python/modify-python-lldb.py @@ -45,11 +45,6 @@ else: # print "output_name is '" + output_name + "'" # -# Version string -# -version_line = "swig_version = %s" - -# # Residues to be removed. # c_endif_swig = "#endif" @@ -338,7 +333,6 @@ init_pattern = re.compile("^ def __init__\(self.*\):") isvalid_pattern = re.compile("^ def IsValid\(") # These define the states of our finite state machine. -EXPECTING_VERSION = 0 NORMAL = 1 DEFINING_ITERATOR = 2 DEFINING_EQUALITY = 4 @@ -364,9 +358,8 @@ lldb_iter_defined = False # The FSM, in all possible states, also checks the current input for IsValid() # definition, and inserts a __nonzero__() method definition to implement truth # value testing and the built-in operation bool(). -state = EXPECTING_VERSION +state = NORMAL -swig_version_tuple = None for line in content.splitlines(): # Handle the state transition into CLEANUP_DOCSTRING state as it is possible # to enter this state from either NORMAL or DEFINING_ITERATOR/EQUALITY. @@ -383,20 +376,6 @@ for line in content.splitlines(): else: state |= CLEANUP_DOCSTRING - if state == EXPECTING_VERSION: - # We haven't read the version yet, read it now. - if swig_version_tuple is None: - match = version_pattern.search(line) - if match: - v = match.group(1) - swig_version_tuple = tuple(map(int, (v.split(".")))) - elif not line.startswith('#'): - # This is the first non-comment line after the header. Inject the - # version - new_line = version_line % str(swig_version_tuple) - new_content.add_line(new_line) - state = NORMAL - if state == NORMAL: match = class_pattern.search(line) # Inserts lldb_helpers and the lldb_iter() definition before the first |