aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-22 14:15:18 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-02-22 14:15:18 -0300
commit52ee91dd73199e068d31d3ac138d933ddd4fb9b1 (patch)
tree9f9f1fdc16c8a3464fef14b9946482df688c2ea8 /lbaselib.c
parent191fd35f0a6cd47ea03417a663395acf5d0e9bf5 (diff)
downloadlua-52ee91dd73199e068d31d3ac138d933ddd4fb9b1.tar.gz
lua-52ee91dd73199e068d31d3ac138d933ddd4fb9b1.tar.bz2
lua-52ee91dd73199e068d31d3ac138d933ddd4fb9b1.zip
better encapsulation of some types
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbaselib.c b/lbaselib.c
index cbaf3b4e..44dc38e5 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.23 2001/02/09 19:52:24 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.24 2001/02/20 18:29:54 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -100,7 +100,7 @@ static int luaB_tonumber (lua_State *L) {
100 luaL_arg_check(L, 2 <= base && base <= 36, 2, "base out of range"); 100 luaL_arg_check(L, 2 <= base && base <= 36, 2, "base out of range");
101 n = strtoul(s1, &s2, base); 101 n = strtoul(s1, &s2, base);
102 if (s1 != s2) { /* at least one valid digit? */ 102 if (s1 != s2) { /* at least one valid digit? */
103 while (isspace((unsigned char)*s2)) s2++; /* skip trailing spaces */ 103 while (isspace(uchar(*s2))) s2++; /* skip trailing spaces */
104 if (*s2 == '\0') { /* no invalid trailing characters? */ 104 if (*s2 == '\0') { /* no invalid trailing characters? */
105 lua_pushnumber(L, n); 105 lua_pushnumber(L, n);
106 return 1; 106 return 1;