Changeset 4deb255


Ignore:
Timestamp:
Sep 30, 2017, 10:23:54 PM (2 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master
Children:
2f02d51
Parents:
5b679ba
Message:

python/ext/py-cvec.c: setters to return a negative value on error (closes #17)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-cvec.c

    r5b679ba r4deb255  
    143143  npy_intp length;
    144144  if (!PyAubio_IsValidVector(input)) {
    145     return 1;
     145    return -1;
    146146  }
    147147  length = PyArray_SIZE ((PyArrayObject *)input);
     
    150150        "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length,
    151151        vec->length);
    152     return 1;
     152    return -1;
    153153  }
    154154
     
    164164  npy_intp length;
    165165  if (!PyAubio_IsValidVector(input)) {
    166     return 1;
     166    return -1;
    167167  }
    168168  length = PyArray_SIZE ((PyArrayObject *)input);
     
    171171        "input array has length %" NPY_INTP_FMT ", but cvec has length %d", length,
    172172        vec->length);
    173     return 1;
     173    return -1;
    174174  }
    175175
Note: See TracChangeset for help on using the changeset viewer.