diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-22 11:28:02 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-22 11:28:02 +1100 |
commit | daeddc461166692743368eb9e68aa041f3994714 (patch) | |
tree | 283e86e19a70495d227f2501fce2c0e8b30fbfe0 /src/ltablib.js | |
parent | edafa230fd74d06ec5f292c7ba471c932942a7c1 (diff) | |
download | fengari-daeddc461166692743368eb9e68aa041f3994714.tar.gz fengari-daeddc461166692743368eb9e68aa041f3994714.tar.bz2 fengari-daeddc461166692743368eb9e68aa041f3994714.zip |
src/l*lib.js: Use lualib.lua_assert from standard library
Diffstat (limited to 'src/ltablib.js')
-rw-r--r-- | src/ltablib.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ltablib.js b/src/ltablib.js index a24a275..6d3eeb2 100644 --- a/src/ltablib.js +++ b/src/ltablib.js @@ -1,10 +1,9 @@ "use strict"; -const assert = require('assert'); - const lua = require('./lua.js'); const lauxlib = require('./lauxlib.js'); const luaconf = require('./luaconf.js'); +const lualib = require('./lualib.js'); const {to_luastring} = require("./fengaricore.js"); /* @@ -234,7 +233,7 @@ const partition = function(L, lo, up) { const choosePivot = function(lo, up, rnd) { let r4 = Math.floor((up - lo) / 4); /* range/4 */ let p = rnd % (r4 * 2) + (lo + r4); - assert(lo + r4 <= p && p <= up - r4); + lualib.lua_assert(lo + r4 <= p && p <= up - r4); return p; }; |