From 59a08453054698e55a9233b1fd5da998430fc2ed Mon Sep 17 00:00:00 2001 From: daurnimator Date: Tue, 30 Jan 2018 00:49:25 +1100 Subject: src/{defs,loadlib}.js: LUA_(C)PATH_DEFAULT now exported as lua strings --- src/loadlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/loadlib.js') 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 */ -- cgit v1.2.3-54-g00ecf