aboutsummaryrefslogtreecommitdiff
path: root/src/luaconf.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/luaconf.js')
-rw-r--r--src/luaconf.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/luaconf.js b/src/luaconf.js
index 4bf8583..c2a7781 100644
--- a/src/luaconf.js
+++ b/src/luaconf.js
@@ -41,6 +41,10 @@ const lua_getlocaledecpoint = function() {
return (1.1).toLocaleString().substring(1, 2);
};
+const luai_apicheck = function(l, e) {
+ if (!e) throw Error(e);
+};
+
// See: http://croquetweak.blogspot.fr/2014/08/deconstructing-floats-frexp-and-ldexp.html
const frexp = function(value) {
if (value === 0) return [value, 0];
@@ -78,3 +82,4 @@ module.exports.lua_getlocaledecpoint = lua_getlocaledecpoint;
module.exports.lua_integer2str = lua_integer2str;
module.exports.lua_number2str = lua_number2str;
module.exports.lua_numbertointeger = lua_numbertointeger;
+module.exports.luai_apicheck = luai_apicheck;