Revision: 5050
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5050&view=rev
Author:   dsdale
Date:     2008-04-19 07:22:11 -0700 (Sat, 19 Apr 2008)

Log Message:
-----------
improve conversion from str to char*, avoid deprecation warnings during 
build

Modified Paths:
--------------
    branches/v0_91_maint/src/_backend_agg.cpp

Modified: branches/v0_91_maint/src/_backend_agg.cpp
===================================================================
--- branches/v0_91_maint/src/_backend_agg.cpp   2008-04-19 14:15:43 UTC (rev 
5049)
+++ branches/v0_91_maint/src/_backend_agg.cpp   2008-04-19 14:22:11 UTC (rev 
5050)
@@ -2269,7 +2269,7 @@
       throw Py::TypeError("Object does not appear to be a 8-bit string path or 
a Python file-like object");
     }
 
-    PyObject_CallFunction(write_method, "s#", pixBuffer, NUMBYTES);
+    PyObject_CallFunction(write_method, (char *)"s#", pixBuffer, NUMBYTES);
 
     Py_XDECREF(write_method);
   }
@@ -2282,7 +2282,7 @@
   PyObject* write_method = PyObject_GetAttrString(py_file_obj, "write");
   PyObject* result = NULL;
   if (write_method)
-    result = PyObject_CallFunction(write_method, "s#", data, length);
+    result = PyObject_CallFunction(write_method, (char *)"s#", data, length);
   Py_XDECREF(write_method);
   Py_XDECREF(result);
 }
@@ -2292,7 +2292,7 @@
   PyObject* flush_method = PyObject_GetAttrString(py_file_obj, "flush");
   PyObject* result = NULL;
   if (flush_method)
-    result = PyObject_CallFunction(flush_method, "");
+    result = PyObject_CallFunction(flush_method, (char *)"");
   Py_XDECREF(flush_method);
   Py_XDECREF(result);
 }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to