diff options
Diffstat (limited to 'c-api/compat-5.3.c')
-rw-r--r-- | c-api/compat-5.3.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |