diff options
author | Guido van Rossum <guido@python.org> | 1998-09-14 15:57:09 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-09-14 15:57:09 (GMT) |
commit | a53f30babce57fcb41d94cb91f4cc816679d22d4 (patch) | |
tree | 506ee7a1d12cb2758e4dc5784ad8373dc7493ebd /Tools/scripts/nm2def.py | |
parent | 4e96ec6a4e971f2cb580f57e3a23265c4aa780d4 (diff) | |
download | cpython-a53f30babce57fcb41d94cb91f4cc816679d22d4.zip cpython-a53f30babce57fcb41d94cb91f4cc816679d22d4.tar.gz cpython-a53f30babce57fcb41d94cb91f4cc816679d22d4.tar.bz2 |
nannified
Diffstat (limited to 'Tools/scripts/nm2def.py')
-rwxr-xr-x | Tools/scripts/nm2def.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/Tools/scripts/nm2def.py b/Tools/scripts/nm2def.py index 120c106..188ab2e 100755 --- a/Tools/scripts/nm2def.py +++ b/Tools/scripts/nm2def.py @@ -45,15 +45,15 @@ def symbols(lib=PYTHONLIB,types=('T','C','D')): lines = map(string.strip,lines) symbols = {} for line in lines: - if len(line) == 0 or ':' in line: - continue - items = string.split(line) - if len(items) != 3: - continue - address, type, name = items - if type not in types: - continue - symbols[name] = address,type + if len(line) == 0 or ':' in line: + continue + items = string.split(line) + if len(items) != 3: + continue + address, type, name = items + if type not in types: + continue + symbols[name] = address,type return symbols def export_list(symbols): @@ -61,10 +61,10 @@ def export_list(symbols): data = [] code = [] for name,(addr,type) in symbols.items(): - if type in ('C','D'): - data.append('\t'+name) - else: - code.append('\t'+name) + if type in ('C','D'): + data.append('\t'+name) + else: + code.append('\t'+name) data.sort() data.append('') code.sort() @@ -84,10 +84,10 @@ SPECIALS = ( def filter_Python(symbols,specials=SPECIALS): for name in symbols.keys(): - if name[:2] == 'Py' or name[:3] == '_Py': - pass - elif name not in specials: - del symbols[name] + if name[:2] == 'Py' or name[:3] == '_Py': + pass + elif name not in specials: + del symbols[name] def main(): |