While compiling matplotlib-0.87.5 with python-2.5 on debian testing some
errors occured:

gcc: src/agg.cxx
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)':
src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)':
src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -Iagg23/include -Isrc -Iswig
-I/home/achim/local/include/python2.5 -c src/agg.cxx -o
build/temp.linux-i686-2.5/src/agg.o" failed with exit status 1


similar errors occured in src/swig_runtime.h

src/swig_runtime.h: In function 'int SWIG_Python_ConvertPtr(PyObject*,
void**, swig_type_info*, int)':
src/swig_runtime.h:1140: error: invalid conversion from 'const char*' to
'char*'

a fix is attached.

Achim
diff -u -x '*.pyc' -x '_n?_*' -r matplotlib-0.87.5/src/agg.cxx 
matplotlib-0.87.5_fixed/src/agg.cxx
--- matplotlib-0.87.5/src/agg.cxx       2006-07-19 04:37:19.000000000 +0200
+++ matplotlib-0.87.5_fixed/src/agg.cxx 2006-09-17 22:46:48.000000000 +0200
@@ -1228,7 +1228,7 @@
     obj = pyobj;
     if (PyCFunction_Check(obj)) {
       /* 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);
       c = doc ? strstr(doc, "swig_ptr: ") : 0;
       if (c) {
        c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
@@ -27621,11 +27621,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 -u -x '*.pyc' -x '_n?_*' -r matplotlib-0.87.5/src/swig_runtime.h 
matplotlib-0.87.5_fixed/src/swig_runtime.h
--- matplotlib-0.87.5/src/swig_runtime.h        2006-07-24 14:19:12.000000000 
+0200
+++ matplotlib-0.87.5_fixed/src/swig_runtime.h  2006-09-17 22:52:16.000000000 
+0200
@@ -1137,7 +1137,7 @@
     obj = pyobj;
     if (PyCFunction_Check(obj)) {
       /* 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);
       c = doc ? strstr(doc, "swig_ptr: ") : 0;
       if (c) {
        c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to