diff options
| author | Philipp Janda <siffiejoe@gmx.net> | 2017-08-27 11:00:02 +0200 |
|---|---|---|
| committer | Philipp Janda <siffiejoe@gmx.net> | 2017-08-27 11:00:02 +0200 |
| commit | 30144ee397495503c42fec822957b396eb3ebcd9 (patch) | |
| tree | 80af4409f77ddb06d1c05821adf959c5dd34dbbf | |
| parent | 8ecb0d1d62794dac65d4855cc150d45cd9cd255b (diff) | |
| download | lua-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.
| -rw-r--r-- | lprefix.h | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -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! */ |
