Skip to content

Commit

Permalink
Support Lua 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mpeterv authored and hishamhm committed Apr 20, 2020
1 parent 04bdaf9 commit 04ba8d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#define LFS_VERSION "1.7.0"
#define LFS_LIBNAME "lfs"

#if LUA_VERSION_NUM >= 503 /* Lua 5.3 */
#if LUA_VERSION_NUM >= 503 /* Lua 5.3+ */

#ifndef luaL_optlong
#define luaL_optlong luaL_optinteger
Expand Down Expand Up @@ -226,7 +226,7 @@ static FILE *check_file (lua_State *L, int idx, const char *funcname) {
return 0;
} else
return *fh;
#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 503
#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 504
luaL_Stream *fh = (luaL_Stream *)luaL_checkudata (L, idx, "FILE*");
if (fh->closef == 0 || fh->f == NULL) {
luaL_error (L, "%s: closed file", funcname);
Expand Down

0 comments on commit 04ba8d6

Please sign in to comment.