svn commit: r355350 - in stable: 11/stand/liblua 12/stand/liblua
Author: kevans Date: Tue Dec 3 18:50:18 2019 New Revision: 355350 URL: https://svnweb.freebsd.org/changeset/base/355350 Log: MFC r354246: liblua: add loader.lua_path As described previously, loader.lua_path is absolute path where scripts are installed. A future commit will use this to build paths for dofile in try_include, rather than the current pcall/require setup that makes it more difficult to coordinate loader aborts from local.lua -- we do not need the flexibility of require(), and local.lua is in-fact not a 'module-like' file as we will not be referencing anything from it. Modified: stable/11/stand/liblua/lutils.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/stand/liblua/lutils.c Directory Properties: stable/12/ (props changed) Modified: stable/11/stand/liblua/lutils.c == --- stable/11/stand/liblua/lutils.c Tue Dec 3 18:44:19 2019 (r355349) +++ stable/11/stand/liblua/lutils.c Tue Dec 3 18:50:18 2019 (r355350) @@ -384,6 +384,8 @@ luaopen_loader(lua_State *L) lua_setfield(L, -2, "machine"); lua_pushstring(L, MACHINE_ARCH); lua_setfield(L, -2, "machine_arch"); + lua_pushstring(L, LUA_PATH); + lua_setfield(L, -2, "lua_path"); /* Set global printc to loader.printc */ lua_register(L, "printc", lua_printc); return 1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r355350 - in stable: 11/stand/liblua 12/stand/liblua
Author: kevans Date: Tue Dec 3 18:50:18 2019 New Revision: 355350 URL: https://svnweb.freebsd.org/changeset/base/355350 Log: MFC r354246: liblua: add loader.lua_path As described previously, loader.lua_path is absolute path where scripts are installed. A future commit will use this to build paths for dofile in try_include, rather than the current pcall/require setup that makes it more difficult to coordinate loader aborts from local.lua -- we do not need the flexibility of require(), and local.lua is in-fact not a 'module-like' file as we will not be referencing anything from it. Modified: stable/12/stand/liblua/lutils.c Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/stand/liblua/lutils.c Directory Properties: stable/11/ (props changed) Modified: stable/12/stand/liblua/lutils.c == --- stable/12/stand/liblua/lutils.c Tue Dec 3 18:44:19 2019 (r355349) +++ stable/12/stand/liblua/lutils.c Tue Dec 3 18:50:18 2019 (r355350) @@ -384,6 +384,8 @@ luaopen_loader(lua_State *L) lua_setfield(L, -2, "machine"); lua_pushstring(L, MACHINE_ARCH); lua_setfield(L, -2, "machine_arch"); + lua_pushstring(L, LUA_PATH); + lua_setfield(L, -2, "lua_path"); /* Set global printc to loader.printc */ lua_register(L, "printc", lua_printc); return 1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"