Copyright | © 2017 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb+hslua@zeitkraut.de> |
Stability | beta |
Portability | ForeignFunctionInterface |
Safe Haskell | None |
Language | Haskell98 |
Haskell bindings to safe, longjmp
catching wrappers of Lua C API functions.
Functions in this module follow a custom protocol. If an error happens (i.e., if
the lua status is not 0), the status code is returned as a negative number.
Results of a successful execution of the wrapped function are returned as
non-negative numbers. This is possible because all (supported) lua API functions
are either safe and don't need wrapping, or return void
, size_t
or a
non-negative int
.
- hslua_compare :: LuaState -> CInt -> CInt -> CInt -> IO CInt
- hslua_concat :: LuaState -> CInt -> IO CInt
- hslua_getfield :: LuaState -> CInt -> Ptr CChar -> IO CInt
- hslua_getglobal :: LuaState -> Ptr CChar -> IO CInt
- hslua_gettable :: LuaState -> CInt -> IO CInt
- hslua_next :: LuaState -> CInt -> IO CInt
- hslua_setfield :: LuaState -> CInt -> Ptr CChar -> IO CInt
- hslua_setglobal :: LuaState -> Ptr CChar -> IO CInt
- hslua_settable :: LuaState -> CInt -> IO CInt
Documentation
hslua_compare :: LuaState -> CInt -> CInt -> CInt -> IO CInt Source #
Wrapper around -- @lua_compare@ which catches any longjmp
s.
hslua_concat :: LuaState -> CInt -> IO CInt Source #
Wrapper around -- @lua_concat@ which catches any longjmp
s.
hslua_getfield :: LuaState -> CInt -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_getfield@ which catches any longjmp
s.
hslua_getglobal :: LuaState -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_getglobal@ which catches any longjmp
s.
hslua_gettable :: LuaState -> CInt -> IO CInt Source #
Wrapper around -- @lua_gettable@ which catches any longjmp
s.
hslua_next :: LuaState -> CInt -> IO CInt Source #
Wrapper around -- @lua_next@ which catches any longjmp
s.
hslua_setfield :: LuaState -> CInt -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_setfield@ which catches any longjmp
s.
hslua_setglobal :: LuaState -> Ptr CChar -> IO CInt Source #
Wrapper around -- @lua_setglobal@ which catches any longjmp
s.
hslua_settable :: LuaState -> CInt -> IO CInt Source #
Wrapper around -- @lua_settable@ which catches any longjmp
s.