diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2018-02-18 01:13:58 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2018-02-18 01:13:58 +0000 |
commit | 6771d4a81564692d88b0fa49acf4f4c9ffec9638 (patch) | |
tree | 1b8ba456d061b7e901ac76f8a3f9ded776fca397 /stand/liblua/lutils.c | |
parent | faf2ee299cb20410ca7a92edce35b78de30f01ff (diff) | |
download | src-6771d4a81564692d88b0fa49acf4f4c9ffec9638.tar.gz src-6771d4a81564692d88b0fa49acf4f4c9ffec9638.zip |
interp_lua: Register io/loader with regular Lua module system
Reviewed by: kevans
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D14421
Notes
Notes:
svn path=/head/; revision=329499
Diffstat (limited to 'stand/liblua/lutils.c')
-rw-r--r-- | stand/liblua/lutils.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c index 7156315ad18c..19deb4774b0f 100644 --- a/stand/liblua/lutils.c +++ b/stand/liblua/lutils.c @@ -233,11 +233,15 @@ static const struct luaL_Reg iolib[] = { }; #undef REG_SIMPLE -void -register_utils(lua_State *L) +int +luaopen_loader(lua_State *L) { luaL_newlib(L, loaderlib); - lua_setglobal(L, "loader"); - luaL_newlib(L, iolib); - lua_setglobal(L, "io"); + return 1; } + +int +luaopen_io(lua_State *L) +{ + luaL_newlib(L, iolib); + return 1; |