diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-09-14 15:03:05 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-09-14 16:24:54 +0100 |
commit | 6273edc2e7179a4bd1a542de69871084e1f18daa (patch) | |
tree | 67a85b6760a68df2bff404107fc260dfefeb6b32 /source/pdf/pdf-js.c | |
parent | d79f72365de5b27b31953f614eb35f8a18b91247 (diff) | |
download | mupdf-6273edc2e7179a4bd1a542de69871084e1f18daa.tar.xz |
Add scripts to remove/replace 'static' from functions.
Getting a backtrace out with missing functions makes the
backtrace much less useful. Some backtrace routines (such
as that used by Memento on Android) are incapable of
resolving static functions.
We therefore provide 2 scripts (scripts/destatic.sh and
scripts/restatic.sh) that respectively remove and replace
the 'static' from function definitions.
The scripts do not affect "static inline" or "static const"
definitions, and they are are restricted to working in the
source directory (excluding source/tools), thirdparty/mujs
and the platform/{java,android} directories.
The transformed source should NOT be checked in.
To avoid problems with clashing symbols, some functions are
renamed or tweaked slightly in this patch.
Diffstat (limited to 'source/pdf/pdf-js.c')
-rw-r--r-- | source/pdf/pdf-js.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/pdf/pdf-js.c b/source/pdf/pdf-js.c index 065a11dd..c3e148fe 100644 --- a/source/pdf/pdf-js.c +++ b/source/pdf/pdf-js.c @@ -20,7 +20,7 @@ FZ_NORETURN static void rethrow(pdf_js *js) } /* Unpack argument object with named arguments into actual parameters. */ -static pdf_js *arguments(js_State *J, ...) +static pdf_js *unpack_arguments(js_State *J, ...) { if (js_isobject(J, 1)) { @@ -80,7 +80,7 @@ static char *pdf_from_utf8(fz_context *ctx, const char *utf8) static void app_alert(js_State *J) { - pdf_js *js = arguments(J, "cMsg", "nIcon", "nType", "cTitle", 0); + pdf_js *js = unpack_arguments(J, "cMsg", "nIcon", "nType", "cTitle", 0); pdf_alert_event event; event.message = js_tostring(J, 1); @@ -461,7 +461,7 @@ static void doc_print(js_State *J) static void doc_mailDoc(js_State *J) { - pdf_js *js = arguments(J, "bUI", "cTo", "cCc", "cBcc", "cSubject", "cMessage", 0); + pdf_js *js = unpack_arguments(J, "bUI", "cTo", "cCc", "cBcc", "cSubject", "cMessage", 0); pdf_mail_doc_event event; event.ask_user = js_isdefined(J, 1) ? js_toboolean(J, 1) : 1; |