summaryrefslogtreecommitdiff
path: root/source/cbz/muimg.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2017-01-19 02:08:49 +0100
committerTor Andersson <tor.andersson@artifex.com>2017-03-28 15:53:56 +0200
commit4918560f7dd434fa5489d4efc442d70835668650 (patch)
treeea14522f16916eac0d83f837ba8bfffbcf6f0bbc /source/cbz/muimg.c
parent161a77db42e306216b5493cf8f8e739053eb86d2 (diff)
downloadmupdf-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/muimg.c')
-rw-r--r--source/cbz/muimg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/cbz/muimg.c b/source/cbz/muimg.c
index 5c9b84bf..4c590f52 100644
--- a/source/cbz/muimg.c
+++ b/source/cbz/muimg.c
@@ -103,7 +103,7 @@ img_new_document(fz_context *ctx, fz_image *image)
return doc;
}
-static img_document *
+static fz_document *
img_open_document_with_stream(fz_context *ctx, fz_stream *stm)
{
fz_buffer *buffer = NULL;
@@ -127,7 +127,7 @@ img_open_document_with_stream(fz_context *ctx, fz_stream *stm)
fz_catch(ctx)
fz_rethrow(ctx);
- return doc;
+ return &doc->super;
}
static int
@@ -172,7 +172,7 @@ img_recognize(fz_context *doc, const char *magic)
fz_document_handler img_document_handler =
{
- (fz_document_recognize_fn *)&img_recognize,
- (fz_document_open_fn *)NULL,
- (fz_document_open_with_stream_fn *)&img_open_document_with_stream
+ img_recognize,
+ NULL,
+ img_open_document_with_stream
};