summaryrefslogtreecommitdiff
path: root/src/lmathlib.js
diff options
context:
space:
mode:
authorBenoit Giannangeli <giann008@gmail.com>2017-10-09 07:49:20 +0200
committerBenoit Giannangeli <giann008@gmail.com>2017-11-09 12:56:17 +0100
commit97a52383d4194678b781e8826c6512fc6fe40288 (patch)
tree1ddc466da9adde4e2025cddd591ad85e0b3ff0ac /src/lmathlib.js
parenta5d5b5f695ad557e25911f08be2d132ab1be658c (diff)
downloadfengari-97a52383d4194678b781e8826c6512fc6fe40288.tar.gz
fengari-97a52383d4194678b781e8826c6512fc6fe40288.tar.bz2
fengari-97a52383d4194678b781e8826c6512fc6fe40288.zip
Removed incorrect use of llimits.MAX/MIN_INT
llimit.js is renamed to llimits.js
Diffstat (limited to 'src/lmathlib.js')
-rw-r--r--src/lmathlib.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lmathlib.js b/src/lmathlib.js
index 16e2ad3..f2354ca 100644
--- a/src/lmathlib.js
+++ b/src/lmathlib.js
@@ -2,7 +2,6 @@
const lua = require('./lua.js');
const lauxlib = require('./lauxlib.js');
-const llimit = require('./llimit.js');
const luaconf = require('./luaconf.js');
const math_random = function(L) {
@@ -27,7 +26,7 @@ const math_random = function(L) {
/* random integer in the interval [low, up] */
lauxlib.luaL_argcheck(L, low <= up, 1, lua.to_luastring("interval is empty", true));
- lauxlib.luaL_argcheck(L, low >= 0 || up <= llimit.MAX_INT + low, 1,
+ lauxlib.luaL_argcheck(L, low >= 0 || up <= luaconf.LUA_MAXINTEGER + low, 1,
lua.to_luastring("interval too large", true));
r *= (up - low) + 1;
@@ -257,9 +256,9 @@ const luaopen_math = function(L) {
lua.lua_setfield(L, -2, lua.to_luastring("pi", true));
lua.lua_pushnumber(L, Infinity);
lua.lua_setfield(L, -2, lua.to_luastring("huge", true));
- lua.lua_pushinteger(L, llimit.MAX_INT);
+ lua.lua_pushinteger(L, luaconf.LUA_MAXINTEGER);
lua.lua_setfield(L, -2, lua.to_luastring("maxinteger", true));
- lua.lua_pushinteger(L, llimit.MIN_INT);
+ lua.lua_pushinteger(L, luaconf.LUA_MININTEGER);
lua.lua_setfield(L, -2, lua.to_luastring("mininteger", true));
return 1;
};