diff options
Diffstat (limited to 'llex.c')
-rw-r--r-- | llex.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: llex.c,v 2.90 2015/03/03 18:17:04 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 2.91 2015/03/28 19:14:47 roberto Exp roberto $ |
3 | ** Lexical Analyzer | 3 | ** Lexical Analyzer |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -221,11 +221,6 @@ static void buffreplace (LexState *ls, char from, char to) { | |||
221 | } | 221 | } |
222 | 222 | ||
223 | 223 | ||
224 | #if !defined(l_getlocaledecpoint) | ||
225 | #define l_getlocaledecpoint() (localeconv()->decimal_point[0]) | ||
226 | #endif | ||
227 | |||
228 | |||
229 | #define buff2num(b,o) (luaO_str2num(luaZ_buffer(b), o) != 0) | 224 | #define buff2num(b,o) (luaO_str2num(luaZ_buffer(b), o) != 0) |
230 | 225 | ||
231 | /* | 226 | /* |
@@ -234,7 +229,7 @@ static void buffreplace (LexState *ls, char from, char to) { | |||
234 | */ | 229 | */ |
235 | static void trydecpoint (LexState *ls, TValue *o) { | 230 | static void trydecpoint (LexState *ls, TValue *o) { |
236 | char old = ls->decpoint; | 231 | char old = ls->decpoint; |
237 | ls->decpoint = l_getlocaledecpoint(); | 232 | ls->decpoint = lua_getlocaledecpoint(); |
238 | buffreplace(ls, old, ls->decpoint); /* try new decimal separator */ | 233 | buffreplace(ls, old, ls->decpoint); /* try new decimal separator */ |
239 | if (!buff2num(ls->buff, o)) { | 234 | if (!buff2num(ls->buff, o)) { |
240 | /* format error with correct decimal point: no more options */ | 235 | /* format error with correct decimal point: no more options */ |