int luaopen_lfs (lua_State *L) { dir_create_meta (L); lock_create_meta (L); luaL_register (L, "lfs", fslib); set_info (L); return 1; }
LUALIB_API int luaopen_lfs(lua_State *L) { dir_create_meta(L); lock_create_meta(L); luaL_newlib(L, fslib); lua_pushvalue(L, -1); lua_setglobal(L, LUA_LFSLIBNAME); set_info(L); return 1; }
int luaopen_lfs (lua_State *L) { dir_create_meta (L); lock_create_meta (L); #if LUA_VERSION_NUM > 501 lua_newtable(L); luaL_setfuncs(L,fslib,0); #else luaL_register (L, "lfs", fslib); #endif set_info (L); return 1; }