[Pkg-ocaml-maint-commits] [SCM] pycaml packaging branch, master, updated. debian/0.82-9-8-ge16b4b5

Stephane Glondu steph at glondu.net
Fri Jun 5 20:36:52 UTC 2009


The following commit has been merged in the master branch:
commit 84c56d3d20a50e4b958d0c384b74c154a4f40f97
Author: Stephane Glondu <steph at glondu.net>
Date:   Fri Jun 5 20:02:23 2009 +0200

    Update Wrap-Py_-calls.patch (Closes: #531806)
    
    Wrap also PyImport_ImportModuleEx, which became a macro in Python 2.6.

diff --git a/debian/patches/0001-Wrap-Py_-calls.patch b/debian/patches/0001-Wrap-Py_-calls.patch
index 3eb0075..001c675 100644
--- a/debian/patches/0001-Wrap-Py_-calls.patch
+++ b/debian/patches/0001-Wrap-Py_-calls.patch
@@ -2,16 +2,20 @@ From: Stephane Glondu <steph at glondu.net>
 Date: Fri, 5 Jun 2009 17:11:04 +0200
 Subject: [PATCH] Wrap Py_* calls
 
-Patch provided by Christopher L. Conway (Closes: #477010).
+This patch wraps calls to Python API macros that used to be functions.
+
+History:
+ * first provided by Christopher L. Conway (Closes: #477010)
+ * adapted for Python 2.6 by Stephane Glondu (Closes: #531806)
 ---
- pycaml_ml.c |   43 ++++++++++++++++++++++++++++++++-----------
- 1 files changed, 32 insertions(+), 11 deletions(-)
+ pycaml_ml.c |   48 ++++++++++++++++++++++++++++++++++++------------
+ 1 files changed, 36 insertions(+), 12 deletions(-)
 
 diff --git a/pycaml_ml.c b/pycaml_ml.c
-index 0edb262..ce6790d 100644
+index 0edb262..f9ea0e4 100644
 --- a/pycaml_ml.c
 +++ b/pycaml_ml.c
-@@ -897,6 +897,27 @@ value pyunwrapvalue( value cb ) {
+@@ -897,6 +897,30 @@ value pyunwrapvalue( value cb ) {
      CAMLreturn(*v);
  }
  
@@ -34,12 +38,15 @@ index 0edb262..ce6790d 100644
 +PyObject * wrap_Py_CompileString(const char *str, const char *p, int s) {
 +  return Py_CompileString(str,p,s);
 +}
++PyObject *wrap_PyImport_ImportModuleEx(char *name, PyObject *globals, PyObject *locals, PyObject *fromlist) {
++  return PyImport_ImportModuleEx(name, globals, locals, fromlist);
++}
 +
 +
  /* Create the function table */
  
  typedef struct _python_func_table {
-@@ -919,16 +940,16 @@ python_func_table the_python_func_table[] = {
+@@ -919,16 +943,16 @@ python_func_table the_python_func_table[] = {
  /* 4 */
      { (void *)Py_IsInitialized, 4, "Py_IsInitialized" },
  /* 5 */
@@ -63,7 +70,7 @@ index 0edb262..ce6790d 100644
  /* 8 */
      { (void *)Py_GetProgramName, 8, "Py_GetProgramName" },
      { (void *)Py_GetPythonHome, 8, "Py_GetPythonHome" },
-@@ -942,13 +963,13 @@ python_func_table the_python_func_table[] = {
+@@ -942,13 +966,13 @@ python_func_table the_python_func_table[] = {
      { (void *)Py_GetCompiler, 8, "Py_GetCompiler" },
      { (void *)Py_GetBuildInfo, 8, "Py_GetBuildInfo" },
  /* 9 */
@@ -81,4 +88,13 @@ index 0edb262..ce6790d 100644
  
  /* Object */
  /* 13 */
+@@ -1125,7 +1149,7 @@ python_func_table the_python_func_table[] = {
+ { (void *)PyImport_AddModule, 28, "PyImport_AddModule" },
+ { (void *)PyImport_ImportModule, 28, "PyImport_ImportModule" },
+ /* 51 */
+-{ (void *)PyImport_ImportModuleEx, 51, "PyImport_ImportModuleEx" },
++{ (void *)wrap_PyImport_ImportModuleEx, 51, "PyImport_ImportModuleEx" },
+ /* 28 */
+ { (void *)PyImport_Import, 28, "PyImport_Import" },
+ /* 14 */
 -- 
diff --git a/debian/patches/0002-Removal-of-PyRange_New.patch b/debian/patches/0002-Removal-of-PyRange_New.patch
index 92f6e72..1570b5d 100644
--- a/debian/patches/0002-Removal-of-PyRange_New.patch
+++ b/debian/patches/0002-Removal-of-PyRange_New.patch
@@ -22,7 +22,7 @@ index cd273ef..6bfe17c 100644
  (* Error handling definitions *)
  
 diff --git a/pycaml_ml.c b/pycaml_ml.c
-index ce6790d..5622274 100644
+index f9ea0e4..3557869 100644
 --- a/pycaml_ml.c
 +++ b/pycaml_ml.c
 @@ -666,7 +666,8 @@ DL_IMPORT(PyObject *) PySlice_New(PyObject* start, PyObject* stop, PyObject* ste
@@ -35,7 +35,7 @@ index ce6790d..5622274 100644
  
  /* Error handling definitions */
  
-@@ -1084,7 +1085,8 @@ python_func_table the_python_func_table[] = {
+@@ -1087,7 +1088,8 @@ python_func_table the_python_func_table[] = {
  /* 43 */
      { (void *)PySlice_GetIndices, 43, "PySlice_GetIndices" },
  /* 44 */

-- 
pycaml packaging



More information about the Pkg-ocaml-maint-commits mailing list