Disregard the previous patch in preference to the attached.
diff -ruN -x cvs -x CVS -x '*~' -x config.log /home/chris/downloads/pycaml/Makefile.in pycaml/Makefile.in --- /home/chris/downloads/pycaml/Makefile.in 2003-09-17 01:30:14.000000000 -0400 +++ pycaml/Makefile.in 2008-05-06 21:49:38.000000000 -0400 @@ -5,6 +5,8 @@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ +OCAMLC=ocamlc +OCAMLMKTOP=ocamlmktop # # The rest is automatic @@ -18,23 +20,23 @@ all: pycamltop pycamltest ocamlobj pycamltop: pycaml_ml.o pycaml.cmo - ocamlmktop -thread -custom -o $@ $(LIBS) + $(OCAMLMKTOP) -thread -custom -o $@ $(LIBS) pycaml_ml.o: pycaml_ml.c - ocamlc -thread -ccopt -c -ccopt -g \ + $(OCAMLC) -thread -ccopt -c -ccopt -g \ -ccopt -I$(PY_PREFIX)/include/python$(PY_VERSION) $< pycaml.cmo: pycaml.ml - ocamlc -thread -c $< + $(OCAMLC) -thread -c $< pycamltest: pycamltest.ml pycaml.cmo pycaml_ml.o - ocamlc -custom -thread -ccopt -g $(LIBS) pycamltest.ml -o $@ + $(OCAMLC) -custom -thread -ccopt -g $(LIBS) pycamltest.ml -o $@ ocamlobj: ocamlobj.ml pycaml.cmo pycaml_ml.o - ocamlc -custom -thread -ccopt -g $(LIBS) ocamlobj.ml -o $@ + $(OCAMLC) -custom -thread -ccopt -g $(LIBS) ocamlobj.ml -o $@ clean: rm -rf *.o *.cmi *.cmo pycamltop pycamltest ocamlobj distclean: clean - rm -rf config.cache autom4te.cache config.status Makefile \ No newline at end of file + rm -rf config.cache autom4te.cache config.status Makefile diff -ruN -x cvs -x CVS -x '*~' -x config.log /home/chris/downloads/pycaml/pycaml.ml pycaml/pycaml.ml --- /home/chris/downloads/pycaml/pycaml.ml 2002-05-29 00:39:10.000000000 -0400 +++ pycaml/pycaml.ml 2008-05-07 16:18:04.000000000 -0400 @@ -318,7 +318,8 @@ (* 43 *) let pyslice_getindices = fmt43call (pnf ()) (* 44 *) -let pyrange_new = fmt44call (pnf ()) +(* PyRange_New has been removed from the API *) +(* let pyrange_new = fmt44call (pnf ()) *) (* Error handling definitions *) diff -ruN -x cvs -x CVS -x '*~' -x config.log /home/chris/downloads/pycaml/pycaml_ml.c pycaml/pycaml_ml.c --- /home/chris/downloads/pycaml/pycaml_ml.c 2004-12-02 11:17:06.000000000 -0500 +++ pycaml/pycaml_ml.c 2008-05-07 16:17:37.000000000 -0400 @@ -666,7 +666,8 @@ /* 43 */ DL_IMPORT(int) PySlice_GetIndices(PySliceObject *r, int length, int *start, int *stop, int *step); /* 44 */ -DL_IMPORT(PyObject *) PyRange_New(long, long, long, int); +/* PyRange_New has been removed from the API */ +/* DL_IMPORT(PyObject *) PyRange_New(long, long, long, int); */ /* Error handling definitions */ @@ -897,6 +898,27 @@ CAMLreturn(*v); } +int wrap_PyRun_SimpleString(const char *s) { return PyRun_SimpleString(s); } +int wrap_PyRun_AnyFile(FILE *f, const char * p) { return PyRun_AnyFile(f,p); } +int wrap_PyRun_AnyFileEx(FILE *f, const char * p, int c) { return PyRun_AnyFileEx(f,p,c); } +int wrap_PyRun_SimpleFile(FILE *f, const char * p) { return PyRun_SimpleFile(f,p); } +int wrap_PyRun_SimpleFileEx(FILE *f, const char * p, int c) { return PyRun_SimpleFileEx(f,p,c); } +int wrap_PyRun_InteractiveOne(FILE *f, const char * p) { return PyRun_InteractiveOne(f,p); } +int wrap_PyRun_InteractiveLoop(FILE *f, const char * p) { return PyRun_InteractiveLoop(f,p); } +PyObject * wrap_PyRun_String(const char *str, int s, PyObject * g, PyObject * l) { + return PyRun_String(str,s,g,l); +} +PyObject * wrap_PyRun_File(FILE *f, const char *p, int s, PyObject * g, PyObject * l) { + return PyRun_File(f,p,s,g,l); +} +PyObject *wrap_PyRun_FileEx(FILE *f, const char *p, int s, PyObject * g, PyObject * l,int c) { + return PyRun_FileEx(f,p,s,g,l,c); +} +PyObject * wrap_Py_CompileString(const char *str, const char *p, int s) { + return Py_CompileString(str,p,s); +} + + /* Create the function table */ typedef struct _python_func_table { @@ -919,16 +941,16 @@ /* 4 */ { (void *)Py_IsInitialized, 4, "Py_IsInitialized" }, /* 5 */ - { (void *)PyRun_SimpleString, 5, "PyRun_SimpleString" }, + { (void *)wrap_PyRun_SimpleString, 5, "PyRun_SimpleString" }, /* 6 */ - { (void *)PyRun_AnyFile, 6, "PyRun_AnyFile" }, - { (void *)PyRun_SimpleFile, 6, "PyRun_SimpleFile" }, - { (void *)PyRun_InteractiveOne, 6, "PyRun_InteractiveOne" }, - { (void *)PyRun_InteractiveLoop, 6, "PyRun_InteractiveLoop" }, + { (void *)wrap_PyRun_AnyFile, 6, "PyRun_AnyFile" }, + { (void *)wrap_PyRun_SimpleFile, 6, "PyRun_SimpleFile" }, + { (void *)wrap_PyRun_InteractiveOne, 6, "PyRun_InteractiveOne" }, + { (void *)wrap_PyRun_InteractiveLoop, 6, "PyRun_InteractiveLoop" }, { (void *)Py_FdIsInteractive, 6, "Py_FdIsInteractive" }, /* 7 */ - { (void *)PyRun_AnyFileEx, 7, "PyRun_AnyFileEx" }, - { (void *)PyRun_SimpleFileEx, 7, "PyRun_SimpleFileEx" }, + { (void *)wrap_PyRun_AnyFileEx, 7, "PyRun_AnyFileEx" }, + { (void *)wrap_PyRun_SimpleFileEx, 7, "PyRun_SimpleFileEx" }, /* 8 */ { (void *)Py_GetProgramName, 8, "Py_GetProgramName" }, { (void *)Py_GetPythonHome, 8, "Py_GetPythonHome" }, @@ -942,13 +964,13 @@ { (void *)Py_GetCompiler, 8, "Py_GetCompiler" }, { (void *)Py_GetBuildInfo, 8, "Py_GetBuildInfo" }, /* 9 */ - { (void *)PyRun_String, 9, "PyRun_String" }, + { (void *)wrap_PyRun_String, 9, "PyRun_String" }, /* 10 */ - { (void *)PyRun_File, 10, "PyRun_File" }, + { (void *)wrap_PyRun_File, 10, "PyRun_File" }, /* 11 */ - { (void *)PyRun_FileEx, 11, "PyRun_FileEx" }, + { (void *)wrap_PyRun_FileEx, 11, "PyRun_FileEx" }, /* 12 */ - { (void *)Py_CompileString, 12, "Py_CompileString" }, + { (void *)wrap_Py_CompileString, 12, "Py_CompileString" }, /* Object */ /* 13 */ @@ -1062,8 +1084,9 @@ { (void *)PySlice_New, 42, "PySlice_New" }, /* 43 */ { (void *)PySlice_GetIndices, 43, "PySlice_GetIndices" }, -/* 44 */ - { (void *)PyRange_New, 44, "PyRange_New" }, +/* 44 */ + /* PyRange_New has been removed from the API */ + /* { (void *)PyRange_New, 44, "PyRange_New" }, */ /* Error handling definitions */