Title: [commits] (robind) [11325] Additional changes to deal with compile errors when building with
Revision
11325
Author
robind
Date
2006-08-04 10:47:01 -0700 (Fri, 04 Aug 2006)

Log Message

Additional changes to deal with compile errors when building with
Python 2.5

Modified Paths

Diff

Modified: trunk/external/swig/patches-1.3.29 (11324 => 11325)

--- trunk/external/swig/patches-1.3.29	2006-08-04 15:48:30 UTC (rev 11324)
+++ trunk/external/swig/patches-1.3.29	2006-08-04 17:47:01 UTC (rev 11325)
@@ -1,6 +1,58 @@
+diff -ur swig-1.3.29.orig/Lib/python/pyinit.swg swig-1.3.29/Lib/python/pyinit.swg
+--- swig-1.3.29.orig/Lib/python/pyinit.swg	2006-02-02 15:48:56.000000000 -0800
++++ swig-1.3.29/Lib/python/pyinit.swg	2006-08-01 12:36:15.000000000 -0700
+@@ -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 -ur swig-1.3.29.orig/Lib/python/pyrun.swg swig-1.3.29/Lib/python/pyrun.swg
+--- swig-1.3.29.orig/Lib/python/pyrun.swg	2006-03-06 16:35:17.000000000 -0800
++++ swig-1.3.29/Lib/python/pyrun.swg	2006-08-01 12:36:15.000000000 -0700
+@@ -12,6 +12,10 @@
+ 
+ /* Common SWIG API */
+ 
++#if PY_VERSION_HEX < 0x02050000
++typedef int Py_ssize_t;
++#endif
++
+ /* for raw pointers */
+ #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
+ #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
+@@ -1075,7 +1079,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;
+diff -ur swig-1.3.29.orig/Lib/python/pystrings.swg swig-1.3.29/Lib/python/pystrings.swg
+--- swig-1.3.29.orig/Lib/python/pystrings.swg	2006-02-23 13:43:33.000000000 -0800
++++ swig-1.3.29/Lib/python/pystrings.swg	2006-08-01 12:36:15.000000000 -0700
+@@ -6,7 +6,7 @@
+ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
+ {
+   if (PyString_Check(obj)) {
+-    char *cstr; int len;
++    char *cstr; Py_ssize_t len;
+     PyString_AsStringAndSize(obj, &cstr, &len);
+     if (cptr)  {
+       if (alloc) {
 diff -ur swig-1.3.29.orig/Lib/typemaps/exception.swg swig-1.3.29/Lib/typemaps/exception.swg
 --- swig-1.3.29.orig/Lib/typemaps/exception.swg	2006-03-06 16:14:10.000000000 -0800
-+++ swig-1.3.29/Lib/typemaps/exception.swg	2006-05-26 16:40:24.000000000 -0700
++++ swig-1.3.29/Lib/typemaps/exception.swg	2006-08-01 12:36:15.000000000 -0700
 @@ -13,7 +13,7 @@
  /* macros for error manipulation */
  #define %nullref_fmt()                     "invalid null reference "		   
@@ -12,7 +64,7 @@
  #define %varnullref_fmt(_type,_name)       %nullref_fmt() %varfail_fmt(_type, _name)  		   
 diff -ur swig-1.3.29.orig/Makefile.in swig-1.3.29/Makefile.in
 --- swig-1.3.29.orig/Makefile.in	2006-03-10 14:54:02.000000000 -0800
-+++ swig-1.3.29/Makefile.in	2006-05-26 16:40:24.000000000 -0700
++++ swig-1.3.29/Makefile.in	2006-08-01 12:36:15.000000000 -0700
 @@ -22,7 +22,7 @@
  source:
  	@cd $(SOURCE) && $(MAKE)
@@ -33,7 +85,7 @@
  	echo  "/* and use the command 'make Lib/swigwarn.swg' instead.                 */" >> $@
 diff -ur swig-1.3.29.orig/Source/Modules/python.cxx swig-1.3.29/Source/Modules/python.cxx
 --- swig-1.3.29.orig/Source/Modules/python.cxx	2006-03-15 17:46:50.000000000 -0800
-+++ swig-1.3.29/Source/Modules/python.cxx	2006-05-26 16:40:24.000000000 -0700
++++ swig-1.3.29/Source/Modules/python.cxx	2006-08-01 12:36:15.000000000 -0700
 @@ -40,7 +40,6 @@
  static  File         *f_init = 0;
  static  File         *f_shadow_py = 0;
@@ -106,7 +158,7 @@
        Printf(f_shadow_file,"%s\n", f_shadow_stubs);
 diff -ur swig-1.3.29.orig/Source/Swig/misc.c swig-1.3.29/Source/Swig/misc.c
 --- swig-1.3.29.orig/Source/Swig/misc.c	2006-03-06 14:51:00.000000000 -0800
-+++ swig-1.3.29/Source/Swig/misc.c	2006-05-26 16:40:24.000000000 -0700
++++ swig-1.3.29/Source/Swig/misc.c	2006-08-01 12:36:15.000000000 -0700
 @@ -900,6 +900,24 @@
  #endif
  




_______________________________________________
Commits mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/commits

Reply via email to