shithub: aubio

Download patch

ref: 1ad9dc32b2da162d9d1282c1b4f2869da1c4e32a
parent: 34d0c257cd6adea857415c783d9a3f1d9bf42ac3
author: Paul Brossier <piem@piem.org>
date: Wed May 11 01:24:13 EDT 2016

python/ext/py-cvec.c: remove unused function

--- a/python/ext/aubio-types.h
+++ b/python/ext/aubio-types.h
@@ -63,7 +63,6 @@
 extern PyObject *PyAubio_CFvecToArray (fvec_t * self);
 extern int PyAubio_ArrayToCFvec (PyObject * self, fvec_t *out);
 
-extern PyObject * PyAubio_CCvecToPyCvec (cvec_t * self);
 extern int PyAubio_PyCvecToCCvec (PyObject *input, cvec_t *i);
 
 extern PyObject *PyAubio_CFmatToArray (fmat_t * self);
--- a/python/ext/py-cvec.c
+++ b/python/ext/py-cvec.c
@@ -32,20 +32,6 @@
   return (PyObject*)vec;
 }
 
-PyObject *
-PyAubio_CCvecToPyCvec (cvec_t * input) {
-  if (input == NULL) {
-      PyErr_SetString (PyExc_ValueError, "PyAubio_CCvecToPyCvec got a null cvec!");
-      return NULL;
-  }
-  Py_cvec* vec = (Py_cvec*) PyObject_New (Py_cvec, &Py_cvecType);
-  npy_intp dims[] = { input->length, 1 };
-  vec->norm = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, input->norm);
-  vec->phas = PyArray_SimpleNewFromData (1, dims, AUBIO_NPY_SMPL, input->phas);
-  vec->length = input->length;
-  return (PyObject *)vec;
-}
-
 int
 PyAubio_PyCvecToCCvec (PyObject *input, cvec_t *i) {
   if (PyObject_TypeCheck (input, &Py_cvecType)) {