summaryrefslogtreecommitdiff
path: root/source/svg
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-07-08 12:04:35 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-07-08 17:21:24 +0200
commit10d6eaa73164b58c91ae8a4537b8a8589038a01d (patch)
tree5b739b0c2202b42a9079ee3ecbd98c3d3b09b124 /source/svg
parentb53e7a42f7cc9756ed9fa1fed313271e3ae67855 (diff)
downloadmupdf-10d6eaa73164b58c91ae8a4537b8a8589038a01d.tar.xz
Separate close and drop functionality for devices and writers.
Closing a device or writer may throw exceptions, but much of the foreign language bindings (JNI and JS) depend on drop to never throw an exception (exceptions in finalizers are bad).
Diffstat (limited to 'source/svg')
-rw-r--r--source/svg/svg-doc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/svg/svg-doc.c b/source/svg/svg-doc.c
index 25f00e62..5404eefa 100644
--- a/source/svg/svg-doc.c
+++ b/source/svg/svg-doc.c
@@ -9,7 +9,7 @@ struct svg_page_s
};
static void
-svg_close_document(fz_context *ctx, fz_document *doc_)
+svg_drop_document(fz_context *ctx, fz_document *doc_)
{
svg_document *doc = (svg_document*)doc_;
fz_drop_tree(ctx, doc->idmap, NULL);
@@ -47,7 +47,7 @@ svg_run_page(fz_context *ctx, fz_page *page_, fz_device *dev, const fz_matrix *c
}
static void
-svg_drop_page_imp(fz_context *ctx, fz_page *page_)
+svg_drop_page(fz_context *ctx, fz_page *page_)
{
/* nothing */
}
@@ -64,7 +64,7 @@ svg_load_page(fz_context *ctx, fz_document *doc_, int number)
page = fz_new_page(ctx, sizeof *page);
page->super.bound_page = svg_bound_page;
page->super.run_page_contents = svg_run_page;
- page->super.drop_page_imp = svg_drop_page_imp;
+ page->super.drop_page = svg_drop_page;
page->doc = doc;
return (fz_page*)page;
@@ -92,7 +92,7 @@ svg_open_document_with_buffer(fz_context *ctx, fz_buffer *buf)
root = fz_parse_xml(ctx, buf->data, buf->len, 0);
doc = fz_new_document(ctx, svg_document);
- doc->super.close = svg_close_document;
+ doc->super.drop_document = svg_drop_document;
doc->super.count_pages = svg_count_pages;
doc->super.load_page = svg_load_page;