diff options
author | Ted Trask <ttrask01@yahoo.com> | 2013-01-08 23:50:04 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2013-01-08 23:50:29 +0000 |
commit | 6361af390c11b7cbac447b830e96101b558f5931 (patch) | |
tree | dd80d8ab606c814ab595b8de4effcbc54be3b08a /main/lua-subprocess/luafileobject.patch | |
parent | ae5dc1a3bd46b4e00fffee99ecbe6d11ca22b8ad (diff) | |
download | aports-6361af390c11b7cbac447b830e96101b558f5931.tar.bz2 aports-6361af390c11b7cbac447b830e96101b558f5931.tar.xz |
main/lua-subprocess: add patches for Lua file objects
Diffstat (limited to 'main/lua-subprocess/luafileobject.patch')
-rw-r--r-- | main/lua-subprocess/luafileobject.patch | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/main/lua-subprocess/luafileobject.patch b/main/lua-subprocess/luafileobject.patch new file mode 100644 index 0000000000..1385aa7b00 --- /dev/null +++ b/main/lua-subprocess/luafileobject.patch @@ -0,0 +1,12 @@ +--- a/liolib-copy.c ++++ b/liolib-copy.c +@@ -312,8 +312,7 @@ static int io_fclose(lua_State *L) + FILE *liolib_copy_tofile(lua_State *L, int index) + { + int eq; +- if (lua_type(L, index) != LUA_TTABLE) return NULL; +- lua_getmetatable(L, index); ++ if (0 == lua_getmetatable(L, index)) return NULL; + luaL_getmetatable(L, LUA_FILEHANDLE); + eq = lua_equal(L, -2, -1); + lua_pop(L, 2); |