Copyright | © 2007–2012 Gracjan Polak; © 2012–2016 Ömer Sinan Ağacan; © 2017-2023 Albert Krewinkel |
---|---|
License | MIT |
Maintainer | Albert Krewinkel <tarleb@hslua.org> |
Stability | beta |
Portability | non-portable (depends on GHC) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Raw bindings to ersatz functions of the auxiliary library.
Synopsis
- hsluaL_newstate :: IO State
- hsluaL_requiref :: State -> Ptr CChar -> CFunction -> LuaBool -> Ptr StatusCode -> IO ()
- hsluaL_tolstring :: State -> StackIndex -> Ptr CSize -> IO (Ptr CChar)
Auxiliary Library
hsluaL_newstate :: IO State Source #
Creates a new Lua state and set extra registry values for error bookkeeping.
If modname
is not already present in package.loaded
. calls
function openf
with string modname
as an argument and sets the
call result in package.loaded[modname]
, as if that function has
been called through
require.
If glb
is true, also stores the module into global modname
.
Leaves a copy of the module on the stack.
hsluaL_tolstring :: State -> StackIndex -> Ptr CSize -> IO (Ptr CChar) Source #
Converts object to string, respecting any metamethods; returns
NULL
if an error occurs.