diff options
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | c-api/compat-5.3.h | 13 |
2 files changed, 14 insertions, 0 deletions
| @@ -142,6 +142,7 @@ For Lua 5.1 additionally: | |||
| 142 | 142 | ||
| 143 | For Lua 5.1 additionally: | 143 | For Lua 5.1 additionally: |
| 144 | * `LUA_OK` | 144 | * `LUA_OK` |
| 145 | * `LUA_ERRGCMM` | ||
| 145 | * `LUA_OP*` macros for `lua_arith` and `lua_compare` | 146 | * `LUA_OP*` macros for `lua_arith` and `lua_compare` |
| 146 | * `lua_Unsigned` | 147 | * `lua_Unsigned` |
| 147 | * `lua_absindex` | 148 | * `lua_absindex` |
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h index 3d20d21..6c76930 100644 --- a/c-api/compat-5.3.h +++ b/c-api/compat-5.3.h | |||
| @@ -88,6 +88,19 @@ extern "C" { | |||
| 88 | # define LUA_OPLE 2 | 88 | # define LUA_OPLE 2 |
| 89 | #endif | 89 | #endif |
| 90 | 90 | ||
| 91 | /* LuaJIT/Lua 5.1 does not have the updated | ||
| 92 | * error codes for thread status/function returns (but some patched versions do) | ||
| 93 | * define it only if it's not found | ||
| 94 | */ | ||
| 95 | #if !defined(LUA_ERRGCMM) | ||
| 96 | /* Use + 2 because in some versions of Lua (Lua 5.1) | ||
| 97 | * LUA_ERRFILE is defined as (LUA_ERRERR+1) | ||
| 98 | * so we need to avoid it (LuaJIT might have something at this | ||
| 99 | * integer value too) | ||
| 100 | */ | ||
| 101 | # define LUA_ERRGCMM (LUA_ERRERR + 2) | ||
| 102 | #endif /* LUA_ERRGCMM define */ | ||
| 103 | |||
| 91 | typedef size_t lua_Unsigned; | 104 | typedef size_t lua_Unsigned; |
| 92 | 105 | ||
| 93 | typedef struct luaL_Buffer_53 { | 106 | typedef struct luaL_Buffer_53 { |
