From 584066ee868958267c3d2bf5c544c0e1449d2748 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <rrt@sc3d.org>
Date: Mon, 1 Oct 2012 19:44:00 +0100
Subject: lfs.c: use Lua 5.2's own luaL_register

---
 src/lfs.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/lfs.c b/src/lfs.c
index 87323b3..8234711 100644
--- a/src/lfs.c
+++ b/src/lfs.c
@@ -56,6 +56,7 @@
 #include <utime.h>
 #endif
 
+#define LUA_COMPAT_ALL
 #include "lua.h"
 #include "lauxlib.h"
 #include "lualib.h"
@@ -877,15 +878,6 @@ static const struct luaL_Reg fslib[] = {
         {NULL, NULL},
 };
 
-#if LUA_VERSION_NUM > 501
-static void luaL_register (lua_State *L, const char *libname, const luaL_Reg *l)
-{
-        luaL_newlib (L, l);
-        lua_pushvalue (L, -1);
-        lua_setglobal (L, libname);
-}
-#endif
-
 int luaopen_lfs (lua_State *L) {
         dir_create_meta (L);
         lock_create_meta (L);
-- 
cgit v1.2.3-55-g6feb