Source

cexp / cexp / fill01.py

from cexputils import MySimObject

cdt_list = ['int', 'uint', 'char', 'bool']

class Fill01(MySimObject):

    _clibname_ = 'libfill01.so'
    _cmembers_ = ['num_i'] + \
                 ['%s %s1d[i]' % (cdt, cdt) for cdt in cdt_list]
    _cfuncs_ = ['run_{cdt | %s}(int repeat)'
                % ', '.join(['%s1d' % cdt for cdt in cdt_list])]