Skip to content

Commit

Permalink
Fix flush callback in PNG file-like object writing.
Browse files Browse the repository at this point in the history
svn path=/trunk/matplotlib/; revision=4290
  • Loading branch information
mdboom committed Nov 14, 2007
1 parent 9b7e883 commit c63145d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/_backend_agg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2266,7 +2266,7 @@ static void write_png_data(png_structp png_ptr, png_bytep data, png_size_t lengt

static void flush_png_data(png_structp png_ptr) {
PyObject* py_file_obj = (PyObject*)png_get_io_ptr(png_ptr);
PyObject* flush_method = PyObject_GetAttrString(py_file_obj, "write");
PyObject* flush_method = PyObject_GetAttrString(py_file_obj, "flush");
if (flush_method) {
PyObject_CallFunction(flush_method, "");
}
Expand Down

0 comments on commit c63145d

Please sign in to comment.