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)
2239
2239
2240
2240
int newwidth = 0 ;
2241
2241
int newheight = 0 ;
2242
+ #if PY3K
2243
+ Py::Bytes data;
2244
+ #else
2242
2245
Py::String data;
2246
+ #endif
2247
+
2243
2248
if (xmin < xmax && ymin < ymax)
2244
2249
{
2245
2250
// Expand the bounds by 1 pixel on all sides
@@ -2269,7 +2274,11 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args)
2269
2274
}
2270
2275
2271
2276
// 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
2273
2282
}
2274
2283
2275
2284
Py::Tuple bounds (4 );
You can’t perform that action at this time.
0 commit comments