diff options
-rw-r--r-- | src/defs.js | 3 | ||||
-rw-r--r-- | src/loadlib.js | 4 | ||||
-rw-r--r-- | src/lua.js | 1 |
3 files changed, 2 insertions, 6 deletions
diff --git a/src/defs.js b/src/defs.js index 6478571..2d0506b 100644 --- a/src/defs.js +++ b/src/defs.js @@ -243,8 +243,6 @@ const LUA_RELEASE = LUA_VERSION + "." + LUA_VERSION_RELEASE; const LUA_COPYRIGHT = LUA_RELEASE + " Copyright (C) 1994-2017 Lua.org, PUC-Rio"; const LUA_AUTHORS = "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"; -const LUA_VERSUFFIX = "_" + LUA_VERSION_MAJOR + "_" + LUA_VERSION_MINOR; - const thread_status = { LUA_OK: 0, LUA_YIELD: 1, @@ -508,7 +506,6 @@ module.exports.LUA_VERSION_MAJOR = LUA_VERSION_MAJOR; module.exports.LUA_VERSION_MINOR = LUA_VERSION_MINOR; module.exports.LUA_VERSION_NUM = LUA_VERSION_NUM; module.exports.LUA_VERSION_RELEASE = LUA_VERSION_RELEASE; -module.exports.LUA_VERSUFFIX = LUA_VERSUFFIX; module.exports.constant_types = constant_types; module.exports.lua_Debug = lua_Debug; module.exports.lua_upvalueindex = lua_upvalueindex; diff --git a/src/loadlib.js b/src/loadlib.js index aa7a372..fce3d57 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -11,7 +11,6 @@ const { LUA_REGISTRYINDEX, LUA_TNIL, LUA_TTABLE, - LUA_VERSUFFIX, lua_callk, lua_createtable, lua_getfield, @@ -62,6 +61,7 @@ const { luaL_pushresult, luaL_setfuncs } = require('./lauxlib.js'); +const lualib = require('./lualib.js'); const { luastring_indexOf, to_jsstring, @@ -281,7 +281,7 @@ const env = (function() { ** Set a path */ const setpath = function(L, fieldname, envname, dft) { - let nver = `${envname}${LUA_VERSUFFIX}`; + let nver = `${envname}${lualib.LUA_VERSUFFIX}`; lua_pushstring(L, to_luastring(nver)); let path = env[nver]; /* use versioned name */ if (path === undefined) /* no environment variable? */ @@ -64,7 +64,6 @@ module.exports.LUA_VERSION_MAJOR = defs.LUA_VERSION_MAJOR; module.exports.LUA_VERSION_MINOR = defs.LUA_VERSION_MINOR; module.exports.LUA_VERSION_NUM = defs.LUA_VERSION_NUM; module.exports.LUA_VERSION_RELEASE = defs.LUA_VERSION_RELEASE; -module.exports.LUA_VERSUFFIX = defs.LUA_VERSUFFIX; module.exports.LUA_YIELD = defs.thread_status.LUA_YIELD; module.exports.lua_Debug = defs.lua_Debug; module.exports.lua_upvalueindex = defs.lua_upvalueindex; |