From f7e30e8523d0123ca738ac2c16982732c87e0615 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 18 Dec 2016 11:26:58 +0100 Subject: [PATCH] python/ext/aubiomodule.c: fix version string on windows --- python/ext/aubiomodule.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/ext/aubiomodule.c b/python/ext/aubiomodule.c index 82674dae..ec1177ce 100644 --- a/python/ext/aubiomodule.c +++ b/python/ext/aubiomodule.c @@ -2,6 +2,10 @@ #include "aubio-types.h" #include "py-musicutils.h" +// this dummy macro is used to convince windows that a string passed as -D flag +// is just that, a string, and not a double. +#define DEFINEDSTRING(x) #x + static char aubio_module_doc[] = "Python module for the aubio library"; static char Py_alpha_norm_doc[] = "" @@ -323,7 +327,7 @@ initaubio (void) PyModule_AddObject (m, "sink", (PyObject *) & Py_sinkType); PyModule_AddStringConstant(m, "float_type", AUBIO_NPY_SMPL_STR); - PyModule_AddStringConstant(m, "__version__", AUBIO_VERSION); + PyModule_AddStringConstant(m, "__version__", DEFINEDSTRING(AUBIO_VERSION)); // add generated objects add_generated_objects(m); -- 2.11.0