Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74fffe0

Browse files
committed
Fix to_string_argb on Python 3.x
1 parent 85ceba6 commit 74fffe0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/_backend_agg.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,12 @@ BufferRegion::to_string_argb(const Py::Tuple &args)
178178
}
179179
}
180180

181-
return Py::String(str, true);
181+
#if PY3K
182+
return Py::Bytes
183+
#else
184+
return Py::String
185+
#endif
186+
(str, true);
182187
}
183188

184189

0 commit comments

Comments
 (0)