]> git.donarmstrong.com Git - lilypond.git/commitdiff
* python/midi.c: PyMIDINIT_FUNC isn't defined in Python < 2.3
authorMats Bengtsson <mats.bengtsson@s3.kth.se>
Thu, 17 Nov 2005 12:48:29 +0000 (12:48 +0000)
committerMats Bengtsson <mats.bengtsson@s3.kth.se>
Thu, 17 Nov 2005 12:48:29 +0000 (12:48 +0000)
add dummy definition that works in Linux and add information in
INSTALL.texi on the specific Python requirements for Cygwin/Mingw.

ChangeLog
Documentation/topdocs/INSTALL.texi
python/midi.c

index 7f0ff0f2676e8e238c4b902316d9f020c86df9f3..3cdb7d7911da07eb745fdff193a71075fce8bc49 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-11-17  Mats Bengtsson  <mabe@drongo.s3.kth.se>
 
+       * 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.
 
index cc8c0be11c7cbc481f2660165b7a6c52f115b3ca..c6081cd744b1afc48372252c77e2617fa7a7e7c5 100644 (file)
@@ -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).
 
index e0e81c16a19138b7451aab945fea4831dc699795..76b75ee9e1e4b233b257f93b89357fe8cfcef198 100644 (file)
@@ -20,6 +20,15 @@ midi.parse (s)
 
 #include <Python.h>
 
+/* 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;