summaryrefslogtreecommitdiff
path: root/source/html
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2017-03-23 21:36:57 -0400
committerRobin Watts <Robin.Watts@artifex.com>2017-03-23 21:39:07 -0400
commitea75724276f1efabd5d78595af0d3d35f7cde659 (patch)
tree5d4ebd5169ba4154109463f7e9bfcf7462737fd6 /source/html
parent6979982ba2900f451c801d35bb7e52413a89d26e (diff)
downloadmupdf-ea75724276f1efabd5d78595af0d3d35f7cde659.tar.xz
Introduce fz_new_derived_...
Instead of having fz_new_XXXX(ctx, type, ...) macros that call fz_new_XXXX_of_size etc, use fz_new_derived_... Clearer naming, and doesn't clash with fz_new_document_writer.
Diffstat (limited to 'source/html')
-rw-r--r--source/html/epub-doc.c4
-rw-r--r--source/html/html-doc.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c
index d443dbae..441bfb83 100644
--- a/source/html/epub-doc.c
+++ b/source/html/epub-doc.c
@@ -215,7 +215,7 @@ static fz_page *
epub_load_page(fz_context *ctx, fz_document *doc_, int number)
{
epub_document *doc = (epub_document*)doc_;
- epub_page *page = fz_new_page(ctx, epub_page);
+ epub_page *page = fz_new_derived_page(ctx, epub_page);
page->super.bound_page = epub_bound_page;
page->super.run_page_contents = epub_run_page;
page->super.load_links = epub_load_links;
@@ -465,7 +465,7 @@ epub_init(fz_context *ctx, fz_archive *zip)
{
epub_document *doc;
- doc = fz_new_document(ctx, epub_document);
+ doc = fz_new_derived_document(ctx, epub_document);
doc->zip = zip;
doc->set = fz_new_html_font_set(ctx);
diff --git a/source/html/html-doc.c b/source/html/html-doc.c
index d9d7d27f..fadb6ee3 100644
--- a/source/html/html-doc.c
+++ b/source/html/html-doc.c
@@ -115,7 +115,7 @@ static fz_page *
htdoc_load_page(fz_context *ctx, fz_document *doc_, int number)
{
html_document *doc = (html_document*)doc_;
- html_page *page = fz_new_page(ctx, html_page);
+ html_page *page = fz_new_derived_page(ctx, html_page);
page->super.bound_page = htdoc_bound_page;
page->super.run_page_contents = htdoc_run_page;
page->super.load_links = htdoc_load_links;
@@ -139,7 +139,7 @@ htdoc_open_document_with_stream(fz_context *ctx, fz_stream *file)
html_document *doc;
fz_buffer *buf;
- doc = fz_new_document(ctx, html_document);
+ doc = fz_new_derived_document(ctx, html_document);
doc->super.drop_document = htdoc_drop_document;
doc->super.layout = htdoc_layout;
@@ -172,7 +172,7 @@ htdoc_open_document(fz_context *ctx, const char *filename)
fz_dirname(dirname, filename, sizeof dirname);
- doc = fz_new_document(ctx, html_document);
+ doc = fz_new_derived_document(ctx, html_document);
doc->super.drop_document = htdoc_drop_document;
doc->super.layout = htdoc_layout;
doc->super.resolve_link = htdoc_resolve_link;