diff --git a/lprefix.h b/lprefix.h index f401c9c..f209cea 100644 --- a/lprefix.h +++ b/lprefix.h @@ -242,13 +242,17 @@ static void createmeta (lua_State *L); # undef LUA_FILEHANDLE # define LUA_FILEHANDLE COMPAT53_LUA_PFILEHANDLE +LUAMOD_API int luaopen_compat53_io (lua_State *L) { + luaL_Reg const funcs[] = { + /* for PUC-Rio Lua 5.1 only */ # if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM == 501 && !defined(LUA_JITLIBNAME) -LUAMOD_API int luaopen_compat53_io (lua_State *L) { - luaL_Reg const funcs[] = { { "popen", io_popen }, { "type", io_ptype }, + +# endif /* for PUC-Rio Lua 5.1 only */ + { NULL, NULL } }; luaL_newlib(L, funcs); @@ -256,7 +260,6 @@ LUAMOD_API int luaopen_compat53_io (lua_State *L) { return 1; } -# endif /* for PUC-Rio Lua 5.1 only */ /* fake CLANG feature detection on other compilers */ # ifndef __has_attribute