From: matsb Date: Thu, 17 Nov 2005 12:48:29 +0000 (+0000) Subject: * python/midi.c: PyMIDINIT_FUNC isn't defined in Python < 2.3 X-Git-Tag: release/2.7.20~40 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=201f6a677e12c6305fc5a44308f9bb8f2c62ec34;p=lilypond.git * python/midi.c: PyMIDINIT_FUNC isn't defined in Python < 2.3 add dummy definition that works in Linux and add information in INSTALL.texi on the specific Python requirements for Cygwin/Mingw. --- diff --git a/ChangeLog b/ChangeLog index 7f0ff0f267..3cdb7d7911 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-11-17 Mats Bengtsson + * python/midi.c: PyMIDINIT_FUNC isn't defined in Python < 2.3 + add dummy definition that works in Linux and add information in + INSTALL.texi on the specific Python requirements for Cygwin/Mingw. + * Documentation/user/changing-defaults.itely (Modifying context plug-ins): Add index for \with. diff --git a/Documentation/topdocs/INSTALL.texi b/Documentation/topdocs/INSTALL.texi index cc8c0be11c..c6081cd744 100644 --- a/Documentation/topdocs/INSTALL.texi +++ b/Documentation/topdocs/INSTALL.texi @@ -88,7 +88,8 @@ may need to install guile-devel or guile-dev or libguile-dev too. @uref{http://gcc.gnu.org/, The GNU c++ compiler} (version 3.3 or newer). EGCS and 2.x are known to cause crashes. -@item @uref{http://www.python.org,Python} (version 2.1 or newer). +@item @uref{http://www.python.org,Python} (version 2.1 or newer except +for Cygwin/Mingw where version 2.3 or newer is needed). @item @uref{ftp://ftp.gnu.org/gnu/make/,GNU Make} (version 3.78 or newer). diff --git a/python/midi.c b/python/midi.c index e0e81c16a1..76b75ee9e1 100644 --- a/python/midi.c +++ b/python/midi.c @@ -20,6 +20,15 @@ midi.parse (s) #include +/* PyMIDINIT_FUNC isn't defined in Python < 2.3 */ +#ifndef PyMODINIT_FUNC +# if defined(__cplusplus) +# define PyMODINIT_FUNC extern "C" void +# else /* __cplusplus */ +# define PyMODINIT_FUNC void +# endif /* __cplusplus */ +#endif + #if 0 int x = 0; int *track = &x;