Skip to content

Commit

Permalink
Merge pull request rainmeter#113 from TheAzack9/lua
Browse files Browse the repository at this point in the history
Added debug, setfenv, getfenv and coroutine package
  • Loading branch information
jsmorley authored Jul 26, 2017
2 parents 5df7c03 + 8677848 commit 555b1a8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions Library/Library_Lua.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<ClCompile Include="lua\lua\lauxlib.c" />
<ClCompile Include="lua\lua\lbaselib.c" />
<ClCompile Include="lua\lua\lcode.c" />
<ClCompile Include="lua\lua\ldblib.c" />
<ClCompile Include="lua\lua\ldebug.c" />
<ClCompile Include="lua\lua\ldo.c" />
<ClCompile Include="lua\lua\ldump.c" />
Expand Down
5 changes: 2 additions & 3 deletions Library/lua/LuaModifications.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
lbaselib.c
- Commented out collectgarbage, getfenv, print, and setfenv functions in base_funcs array
- Commented out luaL_register for coroutine library
- Commented out collectgarbage and print functions in base_funcs array

liolib.c
- Commented out popen in iolib array
- Commented out createstdfile calls for stdin/stdout/stderr in luaopen_io
- Commented out popen related calls in luaopen_io

linit.c
- Commented out debug and package libraries
- Commented out package libraries

loslib.c
- Commented out exit function in syslib array
Expand Down
6 changes: 3 additions & 3 deletions Library/lua/lua/lbaselib.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ static const luaL_Reg base_funcs[] = {
{"dofile", luaB_dofile},
{"error", luaB_error},
// {"gcinfo", luaB_gcinfo},
// {"getfenv", luaB_getfenv},
{"getfenv", luaB_getfenv},
{"getmetatable", luaB_getmetatable},
{"loadfile", luaB_loadfile},
{"load", luaB_load},
Expand All @@ -462,7 +462,7 @@ static const luaL_Reg base_funcs[] = {
{"rawget", luaB_rawget},
{"rawset", luaB_rawset},
{"select", luaB_select},
// {"setfenv", luaB_setfenv},
{"setfenv", luaB_setfenv},
{"setmetatable", luaB_setmetatable},
{"tonumber", luaB_tonumber},
{"tostring", luaB_tostring},
Expand Down Expand Up @@ -647,7 +647,7 @@ static void base_open (lua_State *L) {

LUALIB_API int luaopen_base (lua_State *L) {
base_open(L);
// luaL_register(L, LUA_COLIBNAME, co_funcs);
luaL_register(L, LUA_COLIBNAME, co_funcs);
return 2;
}

2 changes: 1 addition & 1 deletion Library/lua/lua/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static const luaL_Reg lualibs[] = {
{LUA_OSLIBNAME, luaopen_os},
{LUA_STRLIBNAME, luaopen_string},
{LUA_MATHLIBNAME, luaopen_math},
// {LUA_DBLIBNAME, luaopen_debug},
{LUA_DBLIBNAME, luaopen_debug},
{NULL, NULL}
};

Expand Down

0 comments on commit 555b1a8

Please sign in to comment.