{-# LINE 1 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module Foreign.Lua.Api.RawBindings where
import Foreign.C
import Foreign.Lua.Api.Types
import Foreign.Ptr
foreign import ccall "lua.h lua_close"
lua_close :: LuaState -> IO ()
{-# LINE 70 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_absindex"
lua_absindex :: LuaState -> StackIndex -> IO StackIndex
{-# LINE 74 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_gettop"
lua_gettop :: LuaState -> IO StackIndex
{-# LINE 81 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_settop"
{-# LINE 85 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_settop :: LuaState -> StackIndex -> IO ()
{-# LINE 89 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushvalue"
{-# LINE 93 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushvalue :: LuaState -> StackIndex -> IO ()
{-# LINE 96 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 98 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_rotate"
{-# LINE 102 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_rotate :: LuaState -> StackIndex -> CInt -> IO ()
{-# LINE 106 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_copy"
{-# LINE 110 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_copy :: LuaState -> StackIndex -> StackIndex -> IO ()
{-# LINE 136 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 139 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_checkstack"
{-# LINE 143 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_checkstack :: LuaState -> StackIndex -> IO LuaBool
{-# LINE 153 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_isnumber"
{-# LINE 157 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_isnumber :: LuaState -> StackIndex -> IO LuaBool
{-# LINE 161 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_isstring"
{-# LINE 165 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_isstring :: LuaState -> StackIndex -> IO LuaBool
{-# LINE 169 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_iscfunction"
{-# LINE 173 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_iscfunction :: LuaState -> StackIndex -> IO LuaBool
{-# LINE 177 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_isuserdata"
{-# LINE 181 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_isuserdata :: LuaState -> StackIndex -> IO LuaBool
{-# LINE 185 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_type"
{-# LINE 189 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_type :: LuaState -> StackIndex -> IO TypeCode
{-# LINE 193 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_typename"
{-# LINE 197 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_typename :: LuaState -> TypeCode -> IO (Ptr CChar)
{-# LINE 201 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall "safer-api.h hslua_compare"
hslua_compare :: LuaState -> StackIndex -> StackIndex -> CInt
-> IO (Failable LuaBool)
{-# LINE 215 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 218 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_rawequal"
{-# LINE 222 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_rawequal :: LuaState -> StackIndex -> StackIndex -> IO LuaBool
{-# LINE 229 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_toboolean"
{-# LINE 233 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_toboolean :: LuaState -> StackIndex -> IO StackIndex
{-# LINE 237 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_tocfunction"
{-# LINE 241 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_tocfunction :: LuaState -> StackIndex -> IO CFunction
{-# LINE 244 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 246 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_tointegerx"
{-# LINE 250 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_tointegerx :: LuaState -> StackIndex -> Ptr LuaBool -> IO LuaInteger
{-# LINE 254 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_tonumberx"
{-# LINE 258 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_tonumberx :: LuaState -> StackIndex -> Ptr LuaBool -> IO LuaNumber
{-# LINE 276 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 279 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_tolstring"
{-# LINE 283 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_tolstring :: LuaState -> StackIndex -> Ptr CSize -> IO (Ptr CChar)
{-# LINE 287 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_topointer"
{-# LINE 291 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_topointer :: LuaState -> StackIndex -> IO (Ptr ())
{-# LINE 295 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_tothread"
{-# LINE 299 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_tothread :: LuaState -> StackIndex -> IO LuaState
{-# LINE 303 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_touserdata"
{-# LINE 307 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_touserdata :: LuaState -> StackIndex -> IO (Ptr a)
{-# LINE 315 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 317 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_rawlen"
{-# LINE 321 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_rawlen :: LuaState -> StackIndex -> IO CSize
{-# LINE 331 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 338 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushnil"
{-# LINE 342 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushnil :: LuaState -> IO ()
{-# LINE 346 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushnumber"
{-# LINE 350 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushnumber :: LuaState -> LuaNumber -> IO ()
{-# LINE 354 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushinteger"
{-# LINE 358 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushinteger :: LuaState -> LuaInteger -> IO ()
{-# LINE 362 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushlstring"
{-# LINE 366 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushlstring :: LuaState -> Ptr CChar -> CSize -> IO ()
{-# LINE 373 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushcclosure"
{-# LINE 377 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushcclosure :: LuaState -> CFunction -> NumArgs -> IO ()
{-# LINE 381 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushboolean"
{-# LINE 385 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushboolean :: LuaState -> LuaBool -> IO ()
{-# LINE 389 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushlightuserdata"
{-# LINE 393 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushlightuserdata :: LuaState -> Ptr a -> IO ()
{-# LINE 397 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_pushthread"
{-# LINE 401 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_pushthread :: LuaState -> IO CInt
foreign import ccall "safer-api.h hslua_gettable"
hslua_gettable :: LuaState -> StackIndex -> IO CInt
foreign import ccall "safer-api.h hslua_getfield"
hslua_getfield :: LuaState -> StackIndex -> Ptr CChar -> IO CInt
{-# LINE 424 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_rawget"
{-# LINE 428 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_rawget :: LuaState -> StackIndex -> IO ()
{-# LINE 432 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_rawgeti"
{-# LINE 436 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_rawgeti :: LuaState -> StackIndex -> CInt -> IO ()
{-# LINE 440 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_createtable"
{-# LINE 444 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_createtable :: LuaState -> CInt -> CInt -> IO ()
{-# LINE 448 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_newuserdata"
{-# LINE 452 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_newuserdata :: LuaState -> CInt -> IO (Ptr ())
{-# LINE 456 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_getmetatable"
{-# LINE 460 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_getmetatable :: LuaState -> StackIndex -> IO CInt
foreign import ccall "safer-api.h hslua_getglobal"
hslua_getglobal :: LuaState -> Ptr CChar -> IO CInt
foreign import ccall "safer-api.h hslua_settable"
hslua_settable :: LuaState -> StackIndex -> IO CInt
foreign import ccall "safer-api.h hslua_setfield"
hslua_setfield :: LuaState -> StackIndex -> Ptr CChar -> IO CInt
{-# LINE 488 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_rawset"
{-# LINE 492 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_rawset :: LuaState -> StackIndex -> IO ()
{-# LINE 496 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_rawseti"
{-# LINE 500 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_rawseti :: LuaState -> StackIndex -> CInt -> IO ()
{-# LINE 504 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_setmetatable"
{-# LINE 508 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
lua_setmetatable :: LuaState -> StackIndex -> IO ()
foreign import ccall "safer-api.h hslua_setglobal"
hslua_setglobal :: LuaState -> Ptr CChar -> IO CInt
{-# LINE 520 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall "lua.h lua_pcallk"
lua_pcallk :: LuaState -> NumArgs -> NumResults -> StackIndex
-> CInt -> Ptr () -> IO StatusCode
{-# LINE 530 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lua.h lua_status"
lua_status :: LuaState -> IO StatusCode
foreign import ccall "lua.h lua_gc"
lua_gc :: LuaState -> CInt -> CInt -> IO CInt
foreign import ccall "safer-api.h hslua_next"
hslua_next :: LuaState -> StackIndex -> IO (Failable LuaBool)
foreign import ccall "safer-api.h hslua_concat"
hslua_concat :: LuaState -> NumArgs -> IO (Failable LuaBool)
foreign import ccall unsafe "lualib.h luaL_openlibs"
luaL_openlibs :: LuaState -> IO ()
foreign import ccall unsafe "lualib.h &luaopen_base"
lua_open_base_ptr :: CFunction
foreign import ccall unsafe "lualib.h &luaopen_table"
lua_open_table_ptr :: CFunction
foreign import ccall unsafe "lualib.h &luaopen_io"
lua_open_io_ptr :: CFunction
foreign import ccall unsafe "lualib.h &luaopen_os"
lua_open_os_ptr :: CFunction
foreign import ccall unsafe "lualib.h &luaopen_string"
lua_open_string_ptr :: CFunction
foreign import ccall unsafe "lualib.h &luaopen_math"
lua_open_math_ptr :: CFunction
foreign import ccall unsafe "lualib.h &luaopen_debug"
lua_open_debug_ptr :: CFunction
foreign import ccall unsafe "lualib.h &luaopen_package"
lua_open_package_ptr :: CFunction
foreign import ccall unsafe "lauxlib.h luaL_newstate"
luaL_newstate :: IO LuaState
foreign import ccall "lauxlib.h luaL_newmetatable"
luaL_newmetatable :: LuaState -> Ptr CChar -> IO LuaBool
foreign import ccall "lauxlib.h luaL_ref"
luaL_ref :: LuaState -> StackIndex -> IO CInt
foreign import ccall "lauxlib.h luaL_unref"
luaL_unref :: LuaState -> StackIndex -> CInt -> IO ()
{-# LINE 632 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall "lauxlib.h luaL_loadfilex"
luaL_loadfilex :: LuaState -> Ptr CChar -> Ptr CChar -> IO StatusCode
{-# LINE 640 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
{-# LINE 643 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
foreign import ccall unsafe "lauxlib.h luaL_loadstring"
{-# LINE 647 "src/Foreign/Lua/Api/RawBindings.hsc" #-}
luaL_loadstring :: LuaState -> Ptr CChar -> IO StatusCode
foreign import ccall "safer-api.h &hslua_call_hs"
hslua_call_hs_ptr :: CFunction