Changeset ade36e6


Ignore:
Timestamp:
Apr 18, 2016, 11:23:08 PM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
333eec1
Parents:
7ffb554
Message:

python/lib/gen_pyobject.py: prepare for python3 (see #33)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_pyobject.py

    r7ffb554 rade36e6  
    151151    'fvec_t*': 'PyAubio_ArrayToCFvec',
    152152    'cvec_t*': 'PyAubio_ArrayToCCvec',
    153     'uint_t': '(uint_t)PyInt_AsLong',
     153    'uint_t': '(uint_t)PyLong_AsLong',
    154154}
    155155
     
    159159    'cvec_t*': 'PyAubio_CCvecToPyCvec',
    160160    'smpl_t': 'PyFloat_FromDouble',
    161     'uint_t*': 'PyInt_FromLong',
    162     'uint_t': 'PyInt_FromLong',
     161    'uint_t*': 'PyLong_FromLong',
     162    'uint_t': 'PyLong_FromLong',
    163163}
    164164
     
    172172    # "param1", "param2", "param3"
    173173    paramnames = ", ".join(["\""+p['name']+"\"" for p in newparams])
    174     pyparams = "".join(map(lambda p: aubio2pytypes[p['type']], newparams))
     174    pyparams = "".join([aubio2pytypes[p['type']] for p in newparams])
    175175    paramrefs = ", ".join(["&" + p['name'] for p in newparams])
    176176    s = """\
     
    289289
    290290    inputvecs = "  /* input vectors prototypes */\n  "
    291     inputvecs += "\n  ".join(map(lambda p: p['type'] + ' ' + p['name'] + ";", inputparams))
     291    inputvecs += "\n  ".join([ p['type'] + ' ' + p['name'] + ";" for p in inputparams])
    292292
    293293    parseinput = "  /* input vectors parsing */\n  "
     
    363363    n_param = len(doparams)
    364364
    365     if name in param_numbers.keys():
     365    if name in list(param_numbers.keys()):
    366366      n_input_param, n_output_param = param_numbers[name]
    367367    else:
Note: See TracChangeset for help on using the changeset viewer.