Changeset 51ca615


Ignore:
Timestamp:
May 30, 2017, 5:12:55 PM (8 years ago)
Author:
Martin Hermant <martin.hermant@gmail.com>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
dad51ce
Parents:
6e5c03a
Message:

gen_external.py : pass skip_object as member of function to allow custom skip_objects lists

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_external.py

    r6e5c03a r51ca615  
    1212"""
    1313
    14 skip_objects = [
     14default_skip_objects = [
    1515    # already in ext/
    1616    'fft',
     
    136136
    137137
    138 def get_cpp_objects_from_c_declarations(c_declarations):
     138def get_cpp_objects_from_c_declarations(c_declarations,skip_objects = None):
     139    if skip_objects==None:
     140        skip_objects = default_skip_objects
    139141    typedefs = filter(lambda y: y.startswith('typedef struct _aubio'), c_declarations)
    140142    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
    142145
    143146
     
    178181        if o[:6] == 'aubio_':
    179182            shortname = o[6:-2]  # without aubio_ prefix and _t suffix
    180 
    181         if shortname in skip_objects:
    182             continue
    183183
    184184        lib[shortname] = {'struct': [], 'new': [], 'del': [], 'do': [], 'get': [], 'set': [], 'other': []}
Note: See TracChangeset for help on using the changeset viewer.