]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/midi.c
(Prefix_composite_music): untransposable is for
[lilypond.git] / python / midi.c
index f387a758f12e6da131c67adc01ff08476c0dbf27..a8d8d4b8bff5cfd874d2b09c2ddd57ed7a687b48 100644 (file)
@@ -10,7 +10,7 @@
 
 /*
 
-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;