Index: gdalconst_wrap.c
===================================================================
RCS file: /cvs/maptools/cvsroot/gdal/swig/python/gdalconst_wrap.c,v
retrieving revision 1.5
diff -u -r1.5 gdalconst_wrap.c
--- gdalconst_wrap.c	30 Nov 2006 04:21:30 -0000	1.5
+++ gdalconst_wrap.c	6 Dec 2006 15:57:46 -0000
@@ -2031,7 +2031,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;
@@ -2986,11 +2986,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) {
Index: gdal_wrap.cpp
===================================================================
RCS file: /cvs/maptools/cvsroot/gdal/swig/python/gdal_wrap.cpp,v
retrieving revision 1.10
diff -u -r1.10 gdal_wrap.cpp
--- gdal_wrap.cpp	5 Dec 2006 05:31:12 -0000	1.10
+++ gdal_wrap.cpp	6 Dec 2006 15:57:48 -0000
@@ -2048,7 +2048,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;
@@ -2653,7 +2653,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) {
@@ -7599,8 +7599,10 @@
   } 
   arg5 = static_cast< int >(val5);
   {
+      Py_ssize_t ssize;
     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
-    PyString_AsStringAndSize(obj5, &arg7, &arg6 );
+    PyString_AsStringAndSize(obj5, &arg7, &ssize );
+    arg6 = (int) ssize;
   }
   if (obj6) {
     {
@@ -9164,8 +9166,10 @@
   } 
   arg5 = static_cast< int >(val5);
   {
+      Py_ssize_t ssize;
     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
-    PyString_AsStringAndSize(obj5, &arg7, &arg6 );
+    PyString_AsStringAndSize(obj5, &arg7, &ssize );
+    arg6 = (int) ssize;
   }
   if (obj6) {
     {
@@ -11164,11 +11168,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) {
Index: ogr_wrap.cpp
===================================================================
RCS file: /cvs/maptools/cvsroot/gdal/swig/python/ogr_wrap.cpp,v
retrieving revision 1.6
diff -u -r1.6 ogr_wrap.cpp
--- ogr_wrap.cpp	30 Nov 2006 04:21:30 -0000	1.6
+++ ogr_wrap.cpp	6 Dec 2006 15:57:51 -0000
@@ -2048,7 +2048,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;
@@ -2636,7 +2636,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) {
@@ -7405,8 +7405,10 @@
   
   if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkb",kwnames,&obj0,&obj1)) SWIG_fail;
   {
+      Py_ssize_t ssize;
     /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
-    PyString_AsStringAndSize(obj0, &arg2, &arg1 );
+    PyString_AsStringAndSize(obj0, &arg2, &ssize );
+    arg1 = (int) ssize;
   }
   if (obj1) {
     res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
@@ -9984,11 +9986,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) {
Index: osr_wrap.cpp
===================================================================
RCS file: /cvs/maptools/cvsroot/gdal/swig/python/osr_wrap.cpp,v
retrieving revision 1.6
diff -u -r1.6 osr_wrap.cpp
--- osr_wrap.cpp	30 Nov 2006 04:21:30 -0000	1.6
+++ osr_wrap.cpp	6 Dec 2006 15:57:52 -0000
@@ -2048,7 +2048,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;
@@ -2682,7 +2682,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) {
@@ -7439,11 +7439,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) {

