From: Paul Brossier Date: Fri, 23 Sep 2016 06:01:34 +0000 (+0200) Subject: python/ext/aubiomodule.c: undo last commit X-Git-Tag: 0.4.4~190 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=b6230d8b95bc4517987d6a10fb1eb4ff8dc7195a;p=aubio.git python/ext/aubiomodule.c: undo last commit --- diff --git a/python/ext/aubio-types.h b/python/ext/aubio-types.h index 95cb095b..f67b2dad 100644 --- a/python/ext/aubio-types.h +++ b/python/ext/aubio-types.h @@ -51,32 +51,32 @@ #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type) #endif -PyTypeObject Py_cvecType; +extern PyTypeObject Py_cvecType; PyObject * new_py_fvec(uint_t length); PyObject * new_py_cvec(uint_t length); PyObject * new_py_fmat(uint_t height, uint_t length); // defined in aubio-proxy.c -int PyAubio_IsValidVector (PyObject *input); +extern int PyAubio_IsValidVector (PyObject *input); -PyObject *PyAubio_CFvecToArray (fvec_t * self); -int PyAubio_ArrayToCFvec (PyObject * self, fvec_t *out); +extern PyObject *PyAubio_CFvecToArray (fvec_t * self); +extern int PyAubio_ArrayToCFvec (PyObject * self, fvec_t *out); -int PyAubio_PyCvecToCCvec (PyObject *input, cvec_t *i); +extern int PyAubio_PyCvecToCCvec (PyObject *input, cvec_t *i); -PyObject *PyAubio_CFmatToArray (fmat_t * self); -int PyAubio_ArrayToCFmat (PyObject *input, fmat_t *out); +extern PyObject *PyAubio_CFmatToArray (fmat_t * self); +extern int PyAubio_ArrayToCFmat (PyObject *input, fmat_t *out); // hand written wrappers -PyTypeObject Py_filterType; +extern PyTypeObject Py_filterType; -PyTypeObject Py_filterbankType; +extern PyTypeObject Py_filterbankType; -PyTypeObject Py_fftType; +extern PyTypeObject Py_fftType; -PyTypeObject Py_pvocType; +extern PyTypeObject Py_pvocType; -PyTypeObject Py_sourceType; +extern PyTypeObject Py_sourceType; -PyTypeObject Py_sinkType; +extern PyTypeObject Py_sinkType; diff --git a/python/ext/aubiomodule.c b/python/ext/aubiomodule.c index 46c196ee..616dc759 100644 --- a/python/ext/aubiomodule.c +++ b/python/ext/aubiomodule.c @@ -74,8 +74,9 @@ static char Py_min_removal_doc[] = "" "\n" ">>> min_removal(a)"; -void add_ufuncs ( PyObject *m ); -int generated_types_ready(void); +extern void add_generated_objects ( PyObject *m ); +extern void add_ufuncs ( PyObject *m ); +extern int generated_types_ready(void); static PyObject * Py_alpha_norm (PyObject * self, PyObject * args) diff --git a/python/lib/gen_external.py b/python/lib/gen_external.py index a86687d2..533116eb 100644 --- a/python/lib/gen_external.py +++ b/python/lib/gen_external.py @@ -224,7 +224,7 @@ void add_generated_objects ( PyObject *m ) print ("wrote %s" % output_file ) sources_list.append(output_file) - objlist = "".join(["PyTypeObject Py_%sType;\n" % p for p in lib]) + objlist = "".join(["extern PyTypeObject Py_%sType;\n" % p for p in lib]) out = """// generated list of objects created with gen_external.py #include