summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/lua/llex.c
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-12-02 20:06:38 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-12-02 20:06:38 +0000
commit179fab6819d67b04d2d8caa13bc9fe936aff3a3c (patch)
treee402a57cb8a45e297e8fe2fcda2be0ceff5c9e2c /plugins/MirLua/src/lua/llex.c
parent5291f58e733e19f44be355d76c97be4a83ab43d1 (diff)
MirLua: updated lua to 5.3.2
git-svn-id: http://svn.miranda-ng.org/main/trunk@15807 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/lua/llex.c')
-rw-r--r--plugins/MirLua/src/lua/llex.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/MirLua/src/lua/llex.c b/plugins/MirLua/src/lua/llex.c
index c35bd55fa7..16ea3ebebe 100644
--- a/plugins/MirLua/src/lua/llex.c
+++ b/plugins/MirLua/src/lua/llex.c
@@ -1,5 +1,5 @@
/*
-** $Id: llex.c,v 2.93 2015/05/22 17:45:56 roberto Exp $
+** $Id: llex.c,v 2.95 2015/11/19 19:16:22 roberto Exp $
** Lexical Analyzer
** See Copyright Notice in lua.h
*/
@@ -220,8 +220,6 @@ static void buffreplace (LexState *ls, char from, char to) {
}
-#define buff2num(b,o) (luaO_str2num(luaZ_buffer(b), o) != 0)
-
/*
** in case of format error, try to change decimal point separator to
** the one defined in the current locale and check again
@@ -230,7 +228,7 @@ static void trydecpoint (LexState *ls, TValue *o) {
char old = ls->decpoint;
ls->decpoint = lua_getlocaledecpoint();
buffreplace(ls, old, ls->decpoint); /* try new decimal separator */
- if (!buff2num(ls->buff, o)) {
+ if (luaO_str2num(luaZ_buffer(ls->buff), o) == 0) {
/* format error with correct decimal point: no more options */
buffreplace(ls, ls->decpoint, '.'); /* undo change (for error message) */
lexerror(ls, "malformed number", TK_FLT);
@@ -262,7 +260,7 @@ static int read_numeral (LexState *ls, SemInfo *seminfo) {
}
save(ls, '\0');
buffreplace(ls, '.', ls->decpoint); /* follow locale for decimal point */
- if (!buff2num(ls->buff, &obj)) /* format error? */
+ if (luaO_str2num(luaZ_buffer(ls->buff), &obj) == 0) /* format error? */
trydecpoint(ls, &obj); /* try to update decimal point separator */
if (ttisinteger(&obj)) {
seminfo->i = ivalue(&obj);
@@ -277,7 +275,7 @@ static int read_numeral (LexState *ls, SemInfo *seminfo) {
/*
-** skip a sequence '[=*[' or ']=*]'; if sequence is wellformed, return
+** skip a sequence '[=*[' or ']=*]'; if sequence is well formed, return
** its number of '='s; otherwise, return a negative number (-1 iff there
** are no '='s after initial bracket)
*/