diff options
Diffstat (limited to 'src/lstrlib.js')
-rw-r--r-- | src/lstrlib.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lstrlib.js b/src/lstrlib.js index 80a5f55..cfd1c28 100644 --- a/src/lstrlib.js +++ b/src/lstrlib.js @@ -148,7 +148,7 @@ const lua_number2strx = function(L, fmt, x) { ** is maximum exponent + 1). (99+3+1 then rounded to 120 for "extra ** expenses", such as locale-dependent stuff) */ -const MAX_ITEM = 120;// TODO: + l_mathlim(MAX_10_EXP); +// const MAX_ITEM = 120;// TODO: + l_mathlim(MAX_10_EXP); /* valid flags in a format specification */ @@ -157,7 +157,7 @@ const FLAGS = ["-".charCodeAt(0), "+".charCodeAt(0), " ".charCodeAt(0), "#" /* ** maximum size of each format specification (such as "%-099.99d") */ -const MAX_FORMAT = 32; +// const MAX_FORMAT = 32; // TODO: locale ? and do it better const isalpha = e => ('a'.charCodeAt(0) <= e && e <= 'z'.charCodeAt(0)) || (e >= 'A'.charCodeAt(0) && e <= 'Z'.charCodeAt(0)); @@ -607,8 +607,8 @@ const str_pack = function(L) { case KOption.Kstring: { /* strings with length count */ let s = lauxlib.luaL_checkstring(L, arg); let len = s.length; - lauxlib.luaL_argcheck(L, size >= 4 /* sizeof(size_t) */ || - len < (1 << (size * NB)), + lauxlib.luaL_argcheck(L, + size >= 4 /* sizeof(size_t) */ || len < (1 << (size * NB)), arg, lua.to_luastring("string length does not fit in given size", true)); packint(b, len, h.islittle, size, 0); /* pack length */ b.push(...s); @@ -1331,7 +1331,7 @@ const add_value = function(ms, b, s, e, tr) { lua.lua_pushlstring(L, ms.src.slice(s, e), e - s); /* keep original text */ } else if (!lua.lua_isstring(L, -1)) lauxlib.luaL_error(L, lua.to_luastring("invalid replacement value (a %s)"), lauxlib.luaL_typename(L, -1)); - lauxlib.luaL_addvalue(b); /* add result to accumulator */ + lauxlib.luaL_addvalue(b); /* add result to accumulator */ }; const str_gsub = function(L) { |