diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2017-03-23 21:36:57 -0400 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2017-03-23 21:39:07 -0400 |
commit | ea75724276f1efabd5d78595af0d3d35f7cde659 (patch) | |
tree | 5d4ebd5169ba4154109463f7e9bfcf7462737fd6 /source/pdf | |
parent | 6979982ba2900f451c801d35bb7e52413a89d26e (diff) | |
download | mupdf-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/pdf')
-rw-r--r-- | source/pdf/pdf-page.c | 2 | ||||
-rw-r--r-- | source/pdf/pdf-write.c | 2 | ||||
-rw-r--r-- | source/pdf/pdf-xref.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-page.c b/source/pdf/pdf-page.c index 1eec063c..dc907798 100644 --- a/source/pdf/pdf-page.c +++ b/source/pdf/pdf-page.c @@ -649,7 +649,7 @@ pdf_drop_page_imp(fz_context *ctx, pdf_page *page) static pdf_page * pdf_new_page(fz_context *ctx, pdf_document *doc) { - pdf_page *page = fz_new_page(ctx, pdf_page); + pdf_page *page = fz_new_derived_page(ctx, pdf_page); page->doc = (pdf_document*) fz_keep_document(ctx, &doc->super); diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c index 9af70bb4..5477fa07 100644 --- a/source/pdf/pdf-write.c +++ b/source/pdf/pdf-write.c @@ -3273,7 +3273,7 @@ pdf_writer_drop_writer(fz_context *ctx, fz_document_writer *wri_) fz_document_writer * fz_new_pdf_writer(fz_context *ctx, const char *path, const char *options) { - pdf_writer *wri = fz_new_writer(ctx, pdf_writer, pdf_writer_begin_page, pdf_writer_end_page, pdf_writer_close_writer, pdf_writer_drop_writer); + pdf_writer *wri = fz_new_derived_document_writer(ctx, pdf_writer, pdf_writer_begin_page, pdf_writer_end_page, pdf_writer_close_writer, pdf_writer_drop_writer); fz_try(ctx) { diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index e7278ae8..b757dfed 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -2228,7 +2228,7 @@ pdf_lookup_metadata(fz_context *ctx, pdf_document *doc, const char *key, char *b static pdf_document * pdf_new_document(fz_context *ctx, fz_stream *file) { - pdf_document *doc = fz_new_document(ctx, pdf_document); + pdf_document *doc = fz_new_derived_document(ctx, pdf_document); doc->super.drop_document = (fz_document_drop_fn *)pdf_drop_document_imp; doc->super.needs_password = (fz_document_needs_password_fn *)pdf_needs_password; |