diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-24 09:42:06 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-10-24 09:42:06 -0200 |
| commit | 463edee2fd6436d9ad6ae9f2f3d36b742416a479 (patch) | |
| tree | c8f749881839e1bcb4f0fc5740e4e1446e1b3ea5 /lmathlib.c | |
| parent | 88ff582fd8f94dd8ba751142f12bc048815ae20e (diff) | |
| download | lua-463edee2fd6436d9ad6ae9f2f3d36b742416a479.tar.gz lua-463edee2fd6436d9ad6ae9f2f3d36b742416a479.tar.bz2 lua-463edee2fd6436d9ad6ae9f2f3d36b742416a479.zip | |
'lua_numtointeger' -> 'lua_numbertointeger'
Diffstat (limited to 'lmathlib.c')
| -rw-r--r-- | lmathlib.c | 4 |
1 files changed, 2 insertions, 2 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 */ |
