mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-22 02:53:06 +00:00
Support Lua 5.5 (#180)
This commit is contained in:
@@ -311,7 +311,7 @@ static FILE *check_file(lua_State * L, int idx, const char *funcname)
|
|||||||
return 0;
|
return 0;
|
||||||
} else
|
} else
|
||||||
return *fh;
|
return *fh;
|
||||||
#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 504
|
#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 505
|
||||||
luaL_Stream *fh = (luaL_Stream *) luaL_checkudata(L, idx, "FILE*");
|
luaL_Stream *fh = (luaL_Stream *) luaL_checkudata(L, idx, "FILE*");
|
||||||
if (fh->closef == 0 || fh->f == NULL) {
|
if (fh->closef == 0 || fh->f == NULL) {
|
||||||
luaL_error(L, "%s: closed file", funcname);
|
luaL_error(L, "%s: closed file", funcname);
|
||||||
|
|||||||
Reference in New Issue
Block a user