summaryrefslogtreecommitdiff
path: root/src/luaconf.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/luaconf.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/luaconf.js')
-rw-r--r--src/luaconf.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/luaconf.js b/src/luaconf.js
index 8e7885c..00663a6 100644
--- a/src/luaconf.js
+++ b/src/luaconf.js
@@ -1,8 +1,10 @@
"use strict";
-const llimit = require('./llimit.js');
const sprintf = require('sprintf-js').sprintf;
+const LUA_MAXINTEGER = 2147483647;
+const LUA_MININTEGER = -2147483648;
+
/*
@@ LUAI_MAXSTACK limits the size of the Lua stack.
** CHANGE it if you need a different limit. This limit is arbitrary;
@@ -28,7 +30,7 @@ const lua_number2str = function(n) {
};
const lua_numbertointeger = function(n) {
- return n >= llimit.MIN_INT && n < -llimit.MIN_INT ? n : false;
+ return n >= LUA_MININTEGER && n < -LUA_MININTEGER ? n : false;
};
const LUA_INTEGER_FRMLEN = "";
@@ -64,14 +66,16 @@ const ldexp = function(mantissa, exponent) {
return result;
};
-module.exports.frexp = frexp;
-module.exports.ldexp = ldexp;
module.exports.LUAI_MAXSTACK = LUAI_MAXSTACK;
module.exports.LUA_IDSIZE = LUA_IDSIZE;
module.exports.LUA_INTEGER_FMT = LUA_INTEGER_FMT;
module.exports.LUA_INTEGER_FRMLEN = LUA_INTEGER_FRMLEN;
+module.exports.LUA_MAXINTEGER = LUA_MAXINTEGER;
+module.exports.LUA_MININTEGER = LUA_MININTEGER;
module.exports.LUA_NUMBER_FMT = LUA_NUMBER_FMT;
module.exports.LUA_NUMBER_FRMLEN = LUA_NUMBER_FRMLEN;
+module.exports.frexp = frexp;
+module.exports.ldexp = ldexp;
module.exports.lua_getlocaledecpoint = lua_getlocaledecpoint;
module.exports.lua_integer2str = lua_integer2str;
module.exports.lua_number2str = lua_number2str;