Skip to content

Commit

Permalink
Use 'y#' instead of 's#' in write_rgba of the agg backend. Fixes matp…
Browse files Browse the repository at this point in the history
  • Loading branch information
bytbox committed Mar 14, 2014
1 parent 7feeb0e commit 8d397eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_backend_agg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2177,7 +2177,11 @@ RendererAgg::write_rgba(const Py::Tuple& args)
"Object does not appear to be a 8-bit string path or a Python file-like object");
}

#if PY3K
PyObject_CallFunction(write_method, (char *)"y#", pixBuffer, NUMBYTES);
#else
PyObject_CallFunction(write_method, (char *)"s#", pixBuffer, NUMBYTES);
#endif

Py_XDECREF(write_method);
}
Expand Down

0 comments on commit 8d397eb

Please sign in to comment.