Changeset 5c1200a
- Timestamp:
- Apr 18, 2016, 10:53:24 PM (9 years ago)
- 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:
- 0e59ae0
- Parents:
- 2e4ae1d
- Location:
- python/ext
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubiowraphell.h
r2e4ae1d r5c1200a 44 44 #define AUBIO_TYPEOBJECT(NAME, PYNAME) \ 45 45 PyTypeObject Py_ ## NAME ## Type = { \ 46 PyObject_HEAD_INIT (NULL) \ 47 0, \ 46 PyVarObject_HEAD_INIT (NULL, 0) \ 48 47 PYNAME, \ 49 48 sizeof (Py_ ## NAME), \ -
python/ext/py-cvec.c
r2e4ae1d r5c1200a 70 70 PyObject *result = NULL; 71 71 72 format = Py String_FromString ("aubio cvec of %d elements");72 format = PyUnicode_FromString ("aubio cvec of %d elements"); 73 73 if (format == NULL) { 74 74 goto fail; … … 81 81 cvec_print ( self->o ); 82 82 83 result = Py String_Format (format, args);83 result = PyUnicode_Format (format, args); 84 84 85 85 fail: … … 261 261 262 262 PyTypeObject Py_cvecType = { 263 PyObject_HEAD_INIT (NULL) 264 0, /* ob_size */ 263 PyVarObject_HEAD_INIT(NULL, 0) 265 264 "aubio.cvec", /* tp_name */ 266 265 sizeof (Py_cvec), /* tp_basicsize */ -
python/ext/py-fft.c
r2e4ae1d r5c1200a 51 51 char_t errstr[30]; 52 52 sprintf(errstr, "error creating fft with win_s=%d", self->win_s); 53 PyErr_SetString (PyExc_ StandardError, errstr);53 PyErr_SetString (PyExc_Exception, errstr); 54 54 return -1; 55 55 } … … 66 66 del_cvec(self->out); 67 67 del_fvec(self->rout); 68 self->ob_type->tp_free((PyObject *) self);68 Py_TYPE(self)->tp_free((PyObject *) self); 69 69 } 70 70 -
python/ext/py-filter.c
r2e4ae1d r5c1200a 163 163 164 164 PyTypeObject Py_filterType = { 165 PyObject_HEAD_INIT (NULL) 166 0, /* ob_size */ 165 PyVarObject_HEAD_INIT(NULL, 0) 167 166 "aubio.digital_filter", /* tp_name */ 168 167 sizeof (Py_filter), /* tp_basicsize */ -
python/ext/py-filterbank.c
r2e4ae1d r5c1200a 60 60 sprintf(errstr, "error creating filterbank with n_filters=%d, win_s=%d", 61 61 self->n_filters, self->win_s); 62 PyErr_SetString (PyExc_ StandardError, errstr);62 PyErr_SetString (PyExc_RuntimeError, errstr); 63 63 return -1; 64 64 } … … 73 73 del_aubio_filterbank(self->o); 74 74 del_fvec(self->out); 75 self->ob_type->tp_free((PyObject *) self);75 Py_TYPE(self)->tp_free((PyObject *) self); 76 76 } 77 77 -
python/ext/py-phasevoc.c
r2e4ae1d r5c1200a 71 71 del_cvec(self->output); 72 72 del_fvec(self->routput); 73 self->ob_type->tp_free((PyObject *) self);73 Py_TYPE(self)->tp_free((PyObject *) self); 74 74 } 75 75 -
python/ext/py-source.c
r2e4ae1d r5c1200a 160 160 del_fvec(self->read_to); 161 161 del_fmat(self->mread_to); 162 self->ob_type->tp_free((PyObject *) self);162 Py_TYPE(self)->tp_free((PyObject *) self); 163 163 } 164 164 … … 187 187 PyObject *outputs = PyList_New(0); 188 188 PyList_Append( outputs, (PyObject *)PyAubio_CFvecToArray (self->read_to)); 189 PyList_Append( outputs, (PyObject *)Py Int_FromLong(read));189 PyList_Append( outputs, (PyObject *)PyLong_FromLong(read)); 190 190 return outputs; 191 191 } … … 214 214 PyObject *outputs = PyList_New(0); 215 215 PyList_Append( outputs, (PyObject *)PyAubio_CFmatToArray (self->mread_to)); 216 PyList_Append( outputs, (PyObject *)Py Int_FromLong(read));216 PyList_Append( outputs, (PyObject *)PyLong_FromLong(read)); 217 217 return outputs; 218 218 } … … 234 234 { 235 235 uint_t tmp = aubio_source_get_samplerate (self->o); 236 return (PyObject *)Py Int_FromLong (tmp);236 return (PyObject *)PyLong_FromLong (tmp); 237 237 } 238 238 … … 241 241 { 242 242 uint_t tmp = aubio_source_get_channels (self->o); 243 return (PyObject *)Py Int_FromLong (tmp);243 return (PyObject *)PyLong_FromLong (tmp); 244 244 } 245 245
Note: See TracChangeset
for help on using the changeset viewer.