File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2239,7 +2239,12 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args)
22392239
22402240 int newwidth = 0 ;
22412241 int newheight = 0 ;
2242+ #if PY3K
2243+ Py::Bytes data;
2244+ #else
22422245 Py::String data;
2246+ #endif
2247+
22432248 if (xmin < xmax && ymin < ymax)
22442249 {
22452250 // Expand the bounds by 1 pixel on all sides
@@ -2269,7 +2274,11 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args)
22692274 }
22702275
22712276 // The Py::String will take over the buffer
2272- data = Py::String ((const char *)buf, (int )newsize);
2277+ #if PY3K
2278+ data = Py::Bytes ((const char *)buf, (int ) newsize);
2279+ #else
2280+ data = Py::String ((const char *)buf, (int ) newsize);
2281+ #endif
22732282 }
22742283
22752284 Py::Tuple bounds (4 );
You can’t perform that action at this time.
0 commit comments