diff options
-rw-r--r-- | lmathlib.c | 4 | ||||
-rw-r--r-- | ltable.c | 4 | ||||
-rw-r--r-- | lvm.c | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lmathlib.c,v 1.109 2014/10/01 11:54:56 roberto Exp $ | 2 | ** $Id: lmathlib.c,v 1.110 2014/10/08 19:57:31 roberto Exp roberto $ |
3 | ** Standard mathematical library | 3 | ** Standard mathematical library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -91,7 +91,7 @@ static int math_toint (lua_State *L) { | |||
91 | 91 | ||
92 | static void pushnumint (lua_State *L, lua_Number d) { | 92 | static void pushnumint (lua_State *L, lua_Number d) { |
93 | lua_Integer n; | 93 | lua_Integer n; |
94 | if (lua_numtointeger(d, &n)) /* does 'd' fit in an integer? */ | 94 | if (lua_numbertointeger(d, &n)) /* does 'd' fit in an integer? */ |
95 | lua_pushinteger(L, n); /* result is integer */ | 95 | lua_pushinteger(L, n); /* result is integer */ |
96 | else | 96 | else |
97 | lua_pushnumber(L, d); /* result is float */ | 97 | lua_pushnumber(L, d); /* result is float */ |
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.95 2014/09/04 18:15:29 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.96 2014/10/17 16:28:21 roberto Exp roberto $ |
3 | ** Lua tables (hash) | 3 | ** Lua tables (hash) |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -88,7 +88,7 @@ static const Node dummynode_ = { | |||
88 | */ | 88 | */ |
89 | static int numisinteger (lua_Number x, lua_Integer *p) { | 89 | static int numisinteger (lua_Number x, lua_Integer *p) { |
90 | if ((x) == l_floor(x)) /* integral value? */ | 90 | if ((x) == l_floor(x)) /* integral value? */ |
91 | return lua_numtointeger(x, p); /* try as an integer */ | 91 | return lua_numbertointeger(x, p); /* try as an integer */ |
92 | else return 0; | 92 | else return 0; |
93 | } | 93 | } |
94 | 94 | ||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lvm.c,v 2.223 2014/09/04 18:15:29 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.224 2014/10/17 16:28:21 roberto Exp roberto $ |
3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -92,7 +92,7 @@ static int tointeger_aux (const TValue *obj, lua_Integer *p, int mode) { | |||
92 | else if (mode > 0) /* needs ceil? */ | 92 | else if (mode > 0) /* needs ceil? */ |
93 | f += 1; /* convert floor to ceil (remember: n != f) */ | 93 | f += 1; /* convert floor to ceil (remember: n != f) */ |
94 | } | 94 | } |
95 | return lua_numtointeger(f, p); | 95 | return lua_numbertointeger(f, p); |
96 | } | 96 | } |
97 | else if (ttisinteger(obj)) { | 97 | else if (ttisinteger(obj)) { |
98 | *p = ivalue(obj); | 98 | *p = ivalue(obj); |