diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-04-25 15:35:32 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-04-26 15:12:57 +0200 |
commit | c304a128c51939dd507b2cb87c89daf56a659388 (patch) | |
tree | b9d5b78cf6e6acb1466c9061191c4ecdea986df6 /source/tools/murun.c | |
parent | 34bf864107a499d55383ad5709082dbc2e2864df (diff) | |
download | mupdf-c304a128c51939dd507b2cb87c89daf56a659388.tar.xz |
Change order of arguments to pdf_add_page etc.
Resources are defined before they are used; so it's only logical to
have the resource dictionary before the content buffer in the argument
list.
Diffstat (limited to 'source/tools/murun.c')
-rw-r--r-- | source/tools/murun.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/tools/murun.c b/source/tools/murun.c index 2f3d7e64..8825d5af 100644 --- a/source/tools/murun.c +++ b/source/tools/murun.c @@ -2388,12 +2388,12 @@ static void ffi_PDFDocument_addPage(js_State *J) pdf_document *pdf = js_touserdata(J, 0, "pdf_document"); fz_rect mediabox = ffi_torect(J, 1); int rotate = js_tonumber(J, 2); - fz_buffer *contents = ffi_tobuffer(J, 3); /* FIXME: leak if ffi_toobj throws */ - pdf_obj *resources = ffi_toobj(J, pdf, 4); + pdf_obj *resources = ffi_toobj(J, pdf, 3); /* FIXME: leak if ffi_tobuffer throws */ + fz_buffer *contents = ffi_tobuffer(J, 4); pdf_obj *ind; fz_try(ctx) - ind = pdf_add_page(ctx, pdf, &mediabox, rotate, contents, resources); + ind = pdf_add_page(ctx, pdf, &mediabox, rotate, resources, contents); fz_always(ctx) { fz_drop_buffer(ctx, contents); pdf_drop_obj(ctx, resources); |