summaryrefslogtreecommitdiff
path: root/src/ldblib.js
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-18 04:29:58 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-18 06:27:15 +1100
commit214dcf73833f7a29c58eef2b85d68ee3277039f0 (patch)
treee48560b5193f81e5dc4ba5ea4ff78004d274234b /src/ldblib.js
parent2fec758ebe4205ffdbd955967890dbbe4b1869b9 (diff)
downloadfengari-214dcf73833f7a29c58eef2b85d68ee3277039f0.tar.gz
fengari-214dcf73833f7a29c58eef2b85d68ee3277039f0.tar.bz2
fengari-214dcf73833f7a29c58eef2b85d68ee3277039f0.zip
src/: Start using lua_assert() instead of plain assert()
Diffstat (limited to 'src/ldblib.js')
-rw-r--r--src/ldblib.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ldblib.js b/src/ldblib.js
index 9698f7a..d7cf629 100644
--- a/src/ldblib.js
+++ b/src/ldblib.js
@@ -1,9 +1,8 @@
"use strict";
-const assert = require('assert');
-
const lua = require('./lua.js');
const lauxlib = require('./lauxlib.js');
+const lualib = require('./lualib.js');
const {luastring_indexOf, to_luastring} = require("./fengaricore.js");
/*
@@ -282,7 +281,7 @@ const hookf = function(L, ar) {
if (ar.currentline >= 0)
lua.lua_pushinteger(L, ar.currentline); /* push current line */
else lua.lua_pushnil(L);
- assert(lua.lua_getinfo(L, to_luastring("lS"), ar));
+ lualib.lua_assert(lua.lua_getinfo(L, to_luastring("lS"), ar));
lua.lua_call(L, 2, 0); /* call hook function */
}
};