Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -152,7 +152,6 @@ def analyze_c_declarations(cpp_objects, c_declarations): · 151 unmodified lines | ||
| 152 | 152 | lib[shortname] = {'struct': [], 'new': [], 'del': [], 'do': [], 'get': [], 'set': [], 'other': []} |
| 153 | 153 | lib[shortname]['longname'] = longname |
| 154 | 154 | lib[shortname]['shortname'] = shortname |
| 155 | − valid_funcname_part = ['_'+longname,longname+'_'] | |
| 156 | 155 | |
| 157 | 156 | for fn in c_declarations: |
| 158 | 157 | func_name = fn.split('(')[0].strip().split(' ')[1:] |
| @@ -160,7 +159,7 @@ def analyze_c_declarations(cpp_objects, c_declarations): · 1 unmodified line | ||
| 160 | 159 | func_name = func_name[-1] |
| 161 | 160 | else: |
| 162 | 161 | raise NameError('Warning : error while parsing : unexpected line %s' % fn) |
| 163 | − if any(x in func_name for x in valid_funcname_part): | |
| 162 | + if func_name.startswith(longname + '_') or func_name.endswith(longname): | |
| 164 | 163 | # print "found", shortname, "in", fn |
| 165 | 164 | if 'typedef struct ' in fn: |
| 166 | 165 | lib[shortname]['struct'].append(fn) |