diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-01-19 02:08:49 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-03-28 15:53:56 +0200 |
commit | 4918560f7dd434fa5489d4efc442d70835668650 (patch) | |
tree | ea14522f16916eac0d83f837ba8bfffbcf6f0bbc /source/cbz/mutiff.c | |
parent | 161a77db42e306216b5493cf8f8e739053eb86d2 (diff) | |
download | mupdf-4918560f7dd434fa5489d4efc442d70835668650.tar.xz |
Return fz_document from all document handlers.
To make it possible to avoid casting in most cases.
Diffstat (limited to 'source/cbz/mutiff.c')
-rw-r--r-- | source/cbz/mutiff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/cbz/mutiff.c b/source/cbz/mutiff.c index 6b7b989c..637f4e3a 100644 --- a/source/cbz/mutiff.c +++ b/source/cbz/mutiff.c @@ -114,7 +114,7 @@ tiff_drop_document(fz_context *ctx, tiff_document *doc) fz_drop_buffer(ctx, doc->buffer); } -static tiff_document * +static fz_document * tiff_open_document_with_stream(fz_context *ctx, fz_stream *file) { tiff_document *doc; @@ -140,7 +140,7 @@ tiff_open_document_with_stream(fz_context *ctx, fz_stream *file) fz_rethrow(ctx); } - return doc; + return &doc->super; } static int @@ -162,7 +162,7 @@ tiff_recognize(fz_context *doc, const char *magic) fz_document_handler tiff_document_handler = { - (fz_document_recognize_fn *)&tiff_recognize, - (fz_document_open_fn *)NULL, - (fz_document_open_with_stream_fn *)&tiff_open_document_with_stream + tiff_recognize, + NULL, + tiff_open_document_with_stream }; |