Showing the changes to python/lib (1 of 1 file). Show all
Unified · Split
| @@ -11,7 +11,7 @@ source_header = """// this file is generated! do not modify · 10 unmodified lines | ||
| 11 | 11 | #include "aubio-types.h" |
| 12 | 12 | """ |
| 13 | 13 | |
| 14 | −skip_objects = [ | |
| 14 | +default_skip_objects = [ | |
| 15 | 15 | # already in ext/ |
| 16 | 16 | 'fft', |
| 17 | 17 | 'pvoc', |
| @@ -135,10 +135,13 @@ def get_c_declarations(header=header, usedouble=False): · 117 unmodified lines | ||
| 135 | 135 | return cpp_output |
| 136 | 136 | |
| 137 | 137 | |
| 138 | −def get_cpp_objects_from_c_declarations(c_declarations): | |
| 138 | +def get_cpp_objects_from_c_declarations(c_declarations,skip_objects = None): | |
| 139 | + if skip_objects==None: | |
| 140 | + skip_objects = default_skip_objects | |
| 139 | 141 | typedefs = filter(lambda y: y.startswith('typedef struct _aubio'), c_declarations) |
| 140 | 142 | cpp_objects = [a.split()[3][:-1] for a in typedefs] |
| 141 | − return cpp_objects | |
| 143 | + cpp_objects_filtered = filter(lambda y: not y[6:-2] in skip_objects, cpp_objects) | |
| 144 | + return cpp_objects_filtered | |
| 142 | 145 | |
| 143 | 146 | |
| 144 | 147 | def get_all_func_names_from_lib(lib, depth=0): |
| @@ -178,9 +181,6 @@ def generate_lib_from_c_declarations(cpp_objects, c_declarations): · 33 unmodified lines | ||
| 178 | 181 | if o[:6] == 'aubio_': |
| 179 | 182 | shortname = o[6:-2] # without aubio_ prefix and _t suffix |
| 180 | 183 | |
| 181 | − if shortname in skip_objects: | |
| 182 | − continue | |
| 183 | − | |
| 184 | 184 | lib[shortname] = {'struct': [], 'new': [], 'del': [], 'do': [], 'get': [], 'set': [], 'other': []} |
| 185 | 185 | lib[shortname]['longname'] = o |
| 186 | 186 | lib[shortname]['shortname'] = shortname |