diff options
Diffstat (limited to 'lprefix.h')
-rw-r--r-- | lprefix.h | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -51,16 +51,10 @@ | |||
51 | 51 | ||
52 | #ifdef lutf8lib_c | 52 | #ifdef lutf8lib_c |
53 | # define luaopen_utf8 luaopen_compat53_utf8 | 53 | # define luaopen_utf8 luaopen_compat53_utf8 |
54 | # include <stdarg.h> | ||
55 | /* we don't support the %U format string of lua_pushfstring! | 54 | /* we don't support the %U format string of lua_pushfstring! |
56 | * code below adapted from the Lua 5.3 sources: | 55 | * code below adapted from the Lua 5.3 sources: |
57 | */ | 56 | */ |
58 | static const char *compat53_utf8_escape (lua_State* L, ...) { | 57 | static const char *compat53_utf8_escape (lua_State* L, long x) { |
59 | long x = 0; | ||
60 | va_list argp; | ||
61 | va_start(argp, L); | ||
62 | x = (long)va_arg(argp, long); | ||
63 | va_end(argp); | ||
64 | if (x < 0x80) { /* ASCII */ | 58 | if (x < 0x80) { /* ASCII */ |
65 | char c = (char)x; | 59 | char c = (char)x; |
66 | lua_pushlstring(L, &c, 1); | 60 | lua_pushlstring(L, &c, 1); |