aboutsummaryrefslogtreecommitdiff
path: root/llex.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-05-01 15:18:06 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-05-01 15:18:06 -0300
commitc549d4fe64c48ab645740e6d12c69c91250fad3d (patch)
tree1f98183ee7518f107d5902916468d99d7fce9527 /llex.c
parentddff6ecf305e6da4f275b473ef6b66811848a3c6 (diff)
downloadlua-c549d4fe64c48ab645740e6d12c69c91250fad3d.tar.gz
lua-c549d4fe64c48ab645740e6d12c69c91250fad3d.tar.bz2
lua-c549d4fe64c48ab645740e6d12c69c91250fad3d.zip
'lua_strtonum' (and 'luaO_str2num') now return string size, instead of
receiving it
Diffstat (limited to 'llex.c')
-rw-r--r--llex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/llex.c b/llex.c
index ff3c3781..328a4833 100644
--- a/llex.c
+++ b/llex.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: llex.c,v 2.74 2014/02/14 15:23:51 roberto Exp roberto $ 2** $Id: llex.c,v 2.75 2014/04/30 16:48:44 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*/
@@ -210,7 +210,7 @@ static void buffreplace (LexState *ls, char from, char to) {
210#endif 210#endif
211 211
212 212
213#define buff2num(b,o) luaO_str2num(luaZ_buffer(b), luaZ_bufflen(b) - 1, o) 213#define buff2num(b,o) (luaO_str2num(luaZ_buffer(b), o) != 0)
214 214
215/* 215/*
216** in case of format error, try to change decimal point separator to 216** in case of format error, try to change decimal point separator to