summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-01-18 04:38:19 +1100
committerdaurnimator <quae@daurnimator.com>2018-01-18 07:07:46 +1100
commit1f4215034e6c9ca036125d0ddf0e94162da1ecb4 (patch)
treea415be193d24bb9f062104a2605ef994372e5d4f /src
parenta6e100af7363ad5581c568bbfa9887b707b8859e (diff)
downloadfengari-1f4215034e6c9ca036125d0ddf0e94162da1ecb4.tar.gz
fengari-1f4215034e6c9ca036125d0ddf0e94162da1ecb4.tar.bz2
fengari-1f4215034e6c9ca036125d0ddf0e94162da1ecb4.zip
src/lauxlib.js: Export luaL_checkversion_
Diffstat (limited to 'src')
-rw-r--r--src/lauxlib.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lauxlib.js b/src/lauxlib.js
index 5dc42c2..a3b59d3 100644
--- a/src/lauxlib.js
+++ b/src/lauxlib.js
@@ -906,9 +906,7 @@ const lua_writestringerror = function() {
}
};
-const luaL_checkversion = function(L) {
- let ver = lua.LUA_VERSION_NUM;
- let sz = LUAL_NUMSIZES;
+const luaL_checkversion_ = function(L, ver, sz) {
let v = lua.lua_version(L);
if (sz != LUAL_NUMSIZES) /* check numeric types */
luaL_error(L, to_luastring("core and library have incompatible numeric types"));
@@ -918,6 +916,11 @@ const luaL_checkversion = function(L) {
luaL_error(L, to_luastring("version mismatch: app. needs %f, Lua core provides %f"), ver, v);
};
+/* There is no point in providing this function... */
+const luaL_checkversion = function(L) {
+ luaL_checkversion_(L, lua.LUA_VERSION_NUM, LUAL_NUMSIZES);
+};
+
module.exports.LUA_ERRFILE = LUA_ERRFILE;
module.exports.LUA_FILEHANDLE = LUA_FILEHANDLE;
module.exports.LUA_LOADED_TABLE = LUA_LOADED_TABLE;
@@ -945,6 +948,7 @@ module.exports.luaL_checkstring = luaL_checkstring;
module.exports.luaL_checktype = luaL_checktype;
module.exports.luaL_checkudata = luaL_checkudata;
module.exports.luaL_checkversion = luaL_checkversion;
+module.exports.luaL_checkversion_ = luaL_checkversion_;
module.exports.luaL_dofile = luaL_dofile;
module.exports.luaL_dostring = luaL_dostring;
module.exports.luaL_error = luaL_error;