diff options
author | daurnimator <quae@daurnimator.com> | 2018-01-30 00:49:25 +1100 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2018-01-30 00:49:25 +1100 |
commit | 59a08453054698e55a9233b1fd5da998430fc2ed (patch) | |
tree | b7a33286f1492316b6450590c60ec6c0a5845308 /src/loadlib.js | |
parent | 28b3ebb408ac817ac0f465157c77fc5508e340a5 (diff) | |
download | fengari-59a08453054698e55a9233b1fd5da998430fc2ed.tar.gz fengari-59a08453054698e55a9233b1fd5da998430fc2ed.tar.bz2 fengari-59a08453054698e55a9233b1fd5da998430fc2ed.zip |
src/{defs,loadlib}.js: LUA_(C)PATH_DEFAULT now exported as lua strings
Diffstat (limited to 'src/loadlib.js')
-rw-r--r-- | src/loadlib.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/loadlib.js b/src/loadlib.js index 3fcc7c5..83335da 100644 --- a/src/loadlib.js +++ b/src/loadlib.js @@ -288,7 +288,7 @@ const setpath = function(L, fieldname, envname, dft) { if (path === undefined) /* no environment variable? */ path = env[envname]; /* try unversioned name */ if (path === undefined || noenv(L)) /* no environment variable? */ - lua_pushstring(L, to_luastring(dft)); /* use default */ + lua_pushstring(L, dft); /* use default */ else { /* replace ";;" by ";AUXMARK;" and then AUXMARK by default path */ path = luaL_gsub( @@ -297,7 +297,7 @@ const setpath = function(L, fieldname, envname, dft) { to_luastring(LUA_PATH_SEP + LUA_PATH_SEP, true), to_luastring(LUA_PATH_SEP + to_jsstring(AUXMARK) + LUA_PATH_SEP, true) ); - luaL_gsub(L, path, AUXMARK, to_luastring(dft)); + luaL_gsub(L, path, AUXMARK, dft); lua_remove(L, -2); /* remove result from 1st 'gsub' */ } lua_setfield(L, -3, fieldname); /* package[fieldname] = path value */ |