From 4918560f7dd434fa5489d4efc442d70835668650 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Thu, 19 Jan 2017 02:08:49 +0100 Subject: Return fz_document from all document handlers. To make it possible to avoid casting in most cases. --- source/cbz/muimg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/cbz/muimg.c') 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 }; -- cgit v1.2.3