ref: b6230d8b95bc4517987d6a10fb1eb4ff8dc7195a
parent: d8faaf29fa88537518f5cf923cdb51e3f80507e3
author: Paul Brossier <piem@piem.org>
date: Fri Sep 23 04:01:34 EDT 2016
python/ext/aubiomodule.c: undo last commit
--- a/python/ext/aubio-types.h
+++ b/python/ext/aubio-types.h
@@ -51,7 +51,7 @@
#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);
@@ -58,25 +58,25 @@
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;
--- a/python/ext/aubiomodule.c
+++ b/python/ext/aubiomodule.c
@@ -74,8 +74,9 @@
"\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)
--- a/python/lib/gen_external.py
+++ b/python/lib/gen_external.py
@@ -224,7 +224,7 @@
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 <Python.h>