From 30144ee397495503c42fec822957b396eb3ebcd9 Mon Sep 17 00:00:00 2001 From: Philipp Janda Date: Sun, 27 Aug 2017 11:00:02 +0200 Subject: Fix compilation for older versions of Lua 5.3. Fixes #20. --- lprefix.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lprefix.h b/lprefix.h index 9f970c4..cd189a5 100644 --- a/lprefix.h +++ b/lprefix.h @@ -98,6 +98,11 @@ static const char *compat53_utf8_escape (lua_State* L, long x) { # define LUA_INTEGER_FRMLEN "" # define LUA_NUMBER_FRMLEN "" # endif +/* different Lua 5.3 versions have conflicting variants of this macro + * in luaconf.h, there's a fallback implementation in lstrlib.c, and + * the macro isn't used for string (un)packing anyway! + * */ +# undef lua_number2strx # if LUA_VERSION_NUM < 503 /* lstrlib assumes that lua_Integer and lua_Unsigned have the same * size, so we use the unsigned equivalent of ptrdiff_t! */ -- cgit v1.2.3-55-g6feb