File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 print ("\n #ifdef _USE_INTERNAL_HEADER_ /* ALL THESE DEFINES ARE SPECIFIED IN THE INTERNAL HEADER */\n " , file = f )
4747 inside_enum = False
4848 inside_comment = False
49+ line_number = 0
4950 for line in fname :
51+ line_number += 1
5052 if line .lstrip ().startswith ('//' ):
5153 continue
5254 if inside_enum and '}' in line :
7375 continue
7476 if '#define' in line :
7577 sline = line .split ()
76- #print('\t\t' + str(sline))
78+ # DEBUG: print('\t\t' + str(line_number) + ' \t' + str(sline))
7779 if any (x in sline [1 ] for x in ignores ):
7880 continue
79- if re .match ("^\d+?\.\d+?$" , sline [2 ]) is not None :
81+ if len ( sline ) >= 3 and re .match ("^\d+?\.\d+?$" , sline [2 ]) is not None :
8082 # Value is a float
8183 print ('\t result += PyModule_AddObject(module, "{0}", PyFloat_FromDouble({0}));' .format (sline [1 ]), file = f )
8284 else :
You can’t perform that action at this time.
0 commit comments