aboutsummaryrefslogtreecommitdiff
path: root/lprefix.h
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2017-08-27 11:00:02 +0200
committerPhilipp Janda <siffiejoe@gmx.net>2017-08-27 11:00:02 +0200
commit30144ee397495503c42fec822957b396eb3ebcd9 (patch)
tree80af4409f77ddb06d1c05821adf959c5dd34dbbf /lprefix.h
parent8ecb0d1d62794dac65d4855cc150d45cd9cd255b (diff)
downloadlua-compat-5.3-30144ee397495503c42fec822957b396eb3ebcd9.tar.gz
lua-compat-5.3-30144ee397495503c42fec822957b396eb3ebcd9.tar.bz2
lua-compat-5.3-30144ee397495503c42fec822957b396eb3ebcd9.zip
Fix compilation for older versions of Lua 5.3.
Fixes #20.
Diffstat (limited to 'lprefix.h')
-rw-r--r--lprefix.h5
1 files changed, 5 insertions, 0 deletions
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) {
98# define LUA_INTEGER_FRMLEN "" 98# define LUA_INTEGER_FRMLEN ""
99# define LUA_NUMBER_FRMLEN "" 99# define LUA_NUMBER_FRMLEN ""
100# endif 100# endif
101/* different Lua 5.3 versions have conflicting variants of this macro
102 * in luaconf.h, there's a fallback implementation in lstrlib.c, and
103 * the macro isn't used for string (un)packing anyway!
104 * */
105# undef lua_number2strx
101# if LUA_VERSION_NUM < 503 106# if LUA_VERSION_NUM < 503
102/* lstrlib assumes that lua_Integer and lua_Unsigned have the same 107/* lstrlib assumes that lua_Integer and lua_Unsigned have the same
103 * size, so we use the unsigned equivalent of ptrdiff_t! */ 108 * size, so we use the unsigned equivalent of ptrdiff_t! */