]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/midi.c
*** empty log message ***
[lilypond.git] / python / midi.c
index 05d616070606a9bffb649f8c0f2f9758a38dc5ad..5d5e7fba470c3c0954fbc8bc05d4cc3dde51c255 100644 (file)
@@ -3,14 +3,14 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
             Jan Nieuwenhuizen <janneke@gnu.org>
 
 */
 
 /*
 
-python2
+python
 import midi
 s = open ("s.midi").read ()
 midi.parse_track (s)
@@ -18,28 +18,7 @@ midi.parse (s)
 
 */
 
-#include "config.h"
-
-/* urg */
-#if HAVE_PYTHON2_PYTHON_H
-#include <python2/Python.h>
-#elif HAVE_PYTHON2_2_PYTHON_H
-#include <python2.2/Python.h>
-#elif HAVE_PYTHON2_1_PYTHON_H
-#include <python2.1/Python.h>
-#elif HAVE_PYTHON2_0_PYTHON_H
-#include <python2.0/Python.h>
-#elif HAVE_PYTHON1_5_PYTHON_H
-#include <python1.5/Python.h>
-#elif HAVE_PYTHON_PYTHON_H
-#define assert(x)
-#include <python/Python.h>
-#elif HAVE_PYTHON_H
-#define assert(x)
 #include <Python.h>
-#else
-#error Need Python.h
-#endif
 
 #if 0
 int x = 0;
@@ -53,7 +32,7 @@ static PyObject *Midi_error;
 static PyObject *Midi_warning;
 
 static PyObject *
-midi_error (char func, char *s)
+midi_error (char const *func, char *s)
 {
   char*dest = (char*) malloc (sizeof (char) * (strlen (func) + strlen (s) + 1));
   strcpy (dest, func);
@@ -65,7 +44,7 @@ midi_error (char * func, char *s)
 }
 
 static PyObject *
-midi_warning (char *s)
+midi_warning (char const *s)
 {
   PyErr_SetString (Midi_warning, s);
   return 0;
@@ -420,6 +399,7 @@ static PyMethodDef MidiMethods[] =
   {0, 0}        /* Sentinel */
 };
 
+void
 initmidi ()
 {
   PyObject *m, *d;