[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposed patch to be compatible with Python < 2.3
From: |
Mats Bengtsson |
Subject: |
Proposed patch to be compatible with Python < 2.3 |
Date: |
Thu, 17 Nov 2005 11:04:01 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 |
Hi,
May I submit the following patch? Otherwise we have to increase
the required Python version number to 2.3. Of course, I would then
also add a comment in INSTALL.txt that Python 2.3 is needed for
Mingw and Cygwin.
Index: python/midi.c
===================================================================
RCS file: /cvsroot/lilypond/lilypond/python/midi.c,v
retrieving revision 1.12
diff -p -u -u -r1.12 midi.c
--- python/midi.c 2 Nov 2005 01:47:44 -0000 1.12
+++ python/midi.c 17 Nov 2005 09:59:42 -0000
@@ -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;
/Mats
--
=============================================
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================
- Proposed patch to be compatible with Python < 2.3,
Mats Bengtsson <=