aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-03-29 02:36:11 +1100
committerdaurnimator <quae@daurnimator.com>2018-03-29 02:36:11 +1100
commitc0308f2401694031b1b09cbd5d8fb3f9312054f2 (patch)
tree7739a2fd4cf1654b255a2826f19dcb190069a393
parentcf6463724e06075fc608529df92b1bb026fe740e (diff)
downloadfengari-c0308f2401694031b1b09cbd5d8fb3f9312054f2.tar.gz
fengari-c0308f2401694031b1b09cbd5d8fb3f9312054f2.tar.bz2
fengari-c0308f2401694031b1b09cbd5d8fb3f9312054f2.zip
src/defs.js: LUA_VERSUFFIX should only be defined in lualib
-rw-r--r--src/defs.js3
-rw-r--r--src/loadlib.js4
-rw-r--r--src/lua.js1
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? */
diff --git a/src/lua.js b/src/lua.js
index 8e4b1fd..174a394 100644
--- a/src/lua.js
+++ b/src/lua.js
@@ -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;