Revision: 6894
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6894&view=rev
Author:   mdboom
Date:     2009-02-09 18:23:56 +0000 (Mon, 09 Feb 2009)

Log Message:
-----------
Avoid use of "not found everywhere" uint8_t with npy_uint8, since we do include 
and rely on Numpy.

Modified Paths:
--------------
    trunk/matplotlib/src/_path.cpp

Modified: trunk/matplotlib/src/_path.cpp
===================================================================
--- trunk/matplotlib/src/_path.cpp      2009-02-09 13:32:34 UTC (rev 6893)
+++ trunk/matplotlib/src/_path.cpp      2009-02-09 18:23:56 UTC (rev 6894)
@@ -1205,7 +1205,7 @@
 template<class VertexSource>
 void __cleanup_path(VertexSource& source,
                     std::vector<double>& vertices,
-                    std::vector<uint8_t>& codes) {
+                    std::vector<npy_uint8>& codes) {
     unsigned code;
     double x, y;
     do
@@ -1213,7 +1213,7 @@
         code = source.vertex(&x, &y);
         vertices.push_back(x);
         vertices.push_back(y);
-        codes.push_back((uint8_t)code);
+        codes.push_back((npy_uint8)code);
     } while (code != agg::path_cmd_stop);
 }
 
@@ -1222,7 +1222,7 @@
                    const agg::rect_base<double>& rect,
                    e_quantize_mode quantize_mode, bool do_simplify,
                    bool return_curves, std::vector<double>& vertices,
-                   std::vector<uint8_t>& codes) {
+                   std::vector<npy_uint8>& codes) {
     typedef agg::conv_transform<PathIterator>  transformed_path_t;
     typedef PathNanRemover<transformed_path_t> nan_removal_t;
     typedef PathClipper<nan_removal_t>         clipped_t;
@@ -1306,7 +1306,7 @@
     bool return_curves = args[6].isTrue();
 
     std::vector<double> vertices;
-    std::vector<uint8_t> codes;
+    std::vector<npy_uint8> codes;
 
     _cleanup_path(path, trans, remove_nans, do_clip, clip_rect, quantize_mode,
                   simplify, return_curves, vertices, codes);
@@ -1333,7 +1333,7 @@
         }
 
         memcpy(PyArray_DATA(vertices_obj), &vertices[0], sizeof(double) * 2 * 
length);
-        memcpy(PyArray_DATA(codes_obj), &codes[0], sizeof(uint8_t) * length);
+        memcpy(PyArray_DATA(codes_obj), &codes[0], sizeof(npy_uint8) * length);
 
         result[0] = Py::Object((PyObject*)vertices_obj, true);
         result[1] = Py::Object((PyObject*)codes_obj, true);


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

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to