From: Paul Brossier Date: Sun, 18 Dec 2016 10:26:58 +0000 (+0100) Subject: python/ext/aubiomodule.c: fix version string on windows X-Git-Tag: 0.4.4~32 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=f7e30e8523d0123ca738ac2c16982732c87e0615;p=aubio.git python/ext/aubiomodule.c: fix version string on windows --- 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);