diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | c-api/compat-5.3.c | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -74,7 +74,6 @@ For Lua 5.1 additionally: | |||
74 | * `luaL_fileresult` | 74 | * `luaL_fileresult` |
75 | * `luaL_checkversion` (with empty body, only to avoid compile errors) | 75 | * `luaL_checkversion` (with empty body, only to avoid compile errors) |
76 | * `luaL_tolstring` | 76 | * `luaL_tolstring` |
77 | * `luaL_requiref` | ||
78 | * `lua_pushunsigned`, `lua_tounsignedx`, `lua_tounsigned`, | 77 | * `lua_pushunsigned`, `lua_tounsignedx`, `lua_tounsigned`, |
79 | `luaL_checkunsigned`, `luaL_optunsigned`, if | 78 | `luaL_checkunsigned`, `luaL_optunsigned`, if |
80 | `LUA_COMPAT_APIINTCASTS` is defined. | 79 | `LUA_COMPAT_APIINTCASTS` is defined. |
diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c index 9edd5f1..ecb22b0 100644 --- a/c-api/compat-5.3.c +++ b/c-api/compat-5.3.c | |||
@@ -362,6 +362,10 @@ COMPAT53_API void lua_seti (lua_State *L, int index, lua_Integer i) { | |||
362 | } | 362 | } |
363 | 363 | ||
364 | 364 | ||
365 | #if !defined(lua_str2number) | ||
366 | # define lua_str2number(s, p) strtod(s, p) | ||
367 | #endif | ||
368 | |||
365 | COMPAT53_API size_t lua_stringtonumber (lua_State *L, const char *s) { | 369 | COMPAT53_API size_t lua_stringtonumber (lua_State *L, const char *s) { |
366 | char* endptr; | 370 | char* endptr; |
367 | lua_Number n = lua_str2number(s, &endptr); | 371 | lua_Number n = lua_str2number(s, &endptr); |