SOURCES: swig-python25.patch (NEW) - fix for compiling wrappers wi...

grzegol grzegol at pld-linux.org
Mon Aug 28 21:50:23 CEST 2006


Author: grzegol                      Date: Mon Aug 28 19:50:23 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix for compiling wrappers with python-2.5

---- Files affected:
SOURCES:
   swig-python25.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/swig-python25.patch
diff -u /dev/null SOURCES/swig-python25.patch:1.1
--- /dev/null	Mon Aug 28 21:50:23 2006
+++ SOURCES/swig-python25.patch	Mon Aug 28 21:50:18 2006
@@ -0,0 +1,29 @@
+diff -urN aaa/swig-1.3.29/Lib/python/pyinit.swg swig-1.3.29/Lib/python/pyinit.swg
+--- aaa/swig-1.3.29/Lib/python/pyinit.swg	2006-02-03 00:48:56.000000000 +0100
++++ swig-1.3.29/Lib/python/pyinit.swg	2006-08-28 21:12:16.214456216 +0200
+@@ -226,11 +226,11 @@
+ 		       swig_type_info **types_initial) {
+   size_t i;
+   for (i = 0; methods[i].ml_name; ++i) {
+-    char *c = methods[i].ml_doc;
++    const char *c = methods[i].ml_doc;
+     if (c && (c = strstr(c, "swig_ptr: "))) {
+       int j;
+       swig_const_info *ci = 0;
+-      char *name = c + 10;
++      const char *name = c + 10;
+       for (j = 0; const_table[j].type; ++j) {
+ 	if (strncmp(const_table[j].name, name, 
+ 		    strlen(const_table[j].name)) == 0) {
+diff -urN aaa/swig-1.3.29/Lib/python/pyrun.swg swig-1.3.29/Lib/python/pyrun.swg
+--- aaa/swig-1.3.29/Lib/python/pyrun.swg	2006-03-07 01:35:17.000000000 +0100
++++ swig-1.3.29/Lib/python/pyrun.swg	2006-08-28 21:38:24.963970040 +0200
+@@ -1075,7 +1075,7 @@
+     void *vptr = 0;
+     
+     /* here we get the method pointer for callbacks */
+-    char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
++    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+     const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
+     if (desc) {
+       desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
================================================================


More information about the pld-cvs-commit mailing list