From c304a128c51939dd507b2cb87c89daf56a659388 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 25 Apr 2016 15:35:32 +0200 Subject: 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. --- source/tools/murun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/tools/murun.c') 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); -- cgit v1.2.3