Remove getfenv and setfenv functions
The respective C bindings for these functions are only available in lua
5.1. This goes against the idea to have a uniform module interface
across all lua versions. Version-independent environment handling should
be added at some point.
@@ -492,13 +492,6 @@ gc :: GCCONTROL -> Int -> Lua Int
gc i j= liftLua $ \l ->
fromIntegral <$> c_lua_gc l (fromIntegral (fromEnum i)) (fromIntegral j)
-#if LUA_VERSION_NUMBER < 502
--- | See <https://www.lua.org/manual/LUA_VERSION_MAJORMINOR/manual.html#lua_getfenv lua_getfenv>.
-getfenv :: Int -> Lua ()
-getfenv n = liftLua $ \l ->
- c_lua_getfenv l (fromIntegral n)
-#endif
-
-- | See <https://www.lua.org/manual/LUA_VERSION_MAJORMINOR/manual.html#lua_getmetatable lua_getmetatable>.
getmetatable :: StackIndex -> Lua Bool
getmetatable n = liftLua $ \l ->
@@ -658,12 +651,6 @@ replace n = liftLua $ \l -> c_lua_replace l (fromIntegral n)
resume :: Int -> Lua Int
resume n = liftLua $ \l -> fromIntegral <$> c_lua_resume l (fromIntegral n)
-#if LUA_VERSION_NUMBER < 502
--- | See <https://www.lua.org/manual/LUA_VERSION_MAJORMINOR/manual.html#lua_setfenv lua_setfenv>.
-setfenv :: Int -> Lua Int
-setfenv n = liftLua $ \l -> fromIntegral <$> c_lua_setfenv l (fromIntegral n)
-#endif
-
-- | See <https://www.lua.org/manual/LUA_VERSION_MAJORMINOR/manual.html#lua_setmetatable lua_setmetatable>.
setmetatable :: Int -> Lua ()
setmetatable n = liftLua $ \l -> c_lua_setmetatable l (fromIntegral n)
