From 97a52383d4194678b781e8826c6512fc6fe40288 Mon Sep 17 00:00:00 2001 From: Benoit Giannangeli Date: Mon, 9 Oct 2017 07:49:20 +0200 Subject: Removed incorrect use of llimits.MAX/MIN_INT llimit.js is renamed to llimits.js --- src/luaconf.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/luaconf.js') 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; -- cgit v1.2.3-54-g00ecf