mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 06:08:02 +02:00
Use new return value from _cairo_output_stream_destroy
This is a little simpler than the old idiom of calling _cairo_output_stream_get_status just before calling _cairo_output_stream_destroy. I had hoped this technique would apply in more cases, but many cases want to separate the two actions anyway to do conditional assignment of the status value, (in order to not overwrite an earlier error value).
This commit is contained in:
parent
89e7d5d420
commit
179f7defdf
2 changed files with 2 additions and 4 deletions
|
|
@ -546,8 +546,7 @@ _cairo_pdf_surface_finish (void *abstract_surface)
|
|||
"%%%%EOF\r\n",
|
||||
offset);
|
||||
|
||||
status = _cairo_output_stream_get_status (surface->output);
|
||||
_cairo_output_stream_destroy (surface->output);
|
||||
status = _cairo_output_stream_destroy (surface->output);
|
||||
|
||||
_cairo_array_fini (&surface->objects);
|
||||
_cairo_array_fini (&surface->pages);
|
||||
|
|
|
|||
|
|
@ -1803,8 +1803,7 @@ _cairo_svg_document_finish (cairo_svg_document_t *document)
|
|||
_cairo_output_stream_destroy (document->xml_node_glyphs);
|
||||
_cairo_output_stream_destroy (document->xml_node_defs);
|
||||
|
||||
status = _cairo_output_stream_get_status (output);
|
||||
_cairo_output_stream_destroy (output);
|
||||
status = _cairo_output_stream_destroy (output);
|
||||
|
||||
for (i = 0; i < document->meta_snapshots.num_elements; i++) {
|
||||
snapshot = _cairo_array_index (&document->meta_snapshots, i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue