Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a53f30b

Browse files
committed
nannified
1 parent 4e96ec6 commit a53f30b

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

Tools/scripts/nm2def.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,26 @@ def symbols(lib=PYTHONLIB,types=('T','C','D')):
4545
lines = map(string.strip,lines)
4646
symbols = {}
4747
for line in lines:
48-
if len(line) == 0 or ':' in line:
49-
continue
50-
items = string.split(line)
51-
if len(items) != 3:
52-
continue
53-
address, type, name = items
54-
if type not in types:
55-
continue
56-
symbols[name] = address,type
48+
if len(line) == 0 or ':' in line:
49+
continue
50+
items = string.split(line)
51+
if len(items) != 3:
52+
continue
53+
address, type, name = items
54+
if type not in types:
55+
continue
56+
symbols[name] = address,type
5757
return symbols
5858

5959
def export_list(symbols):
6060

6161
data = []
6262
code = []
6363
for name,(addr,type) in symbols.items():
64-
if type in ('C','D'):
65-
data.append('\t'+name)
66-
else:
67-
code.append('\t'+name)
64+
if type in ('C','D'):
65+
data.append('\t'+name)
66+
else:
67+
code.append('\t'+name)
6868
data.sort()
6969
data.append('')
7070
code.sort()
@@ -84,10 +84,10 @@ def export_list(symbols):
8484
def filter_Python(symbols,specials=SPECIALS):
8585

8686
for name in symbols.keys():
87-
if name[:2] == 'Py' or name[:3] == '_Py':
88-
pass
89-
elif name not in specials:
90-
del symbols[name]
87+
if name[:2] == 'Py' or name[:3] == '_Py':
88+
pass
89+
elif name not in specials:
90+
del symbols[name]
9191

9292
def main():
9393

0 commit comments

Comments
 (0)