lua-2.3.2: Lua, an embeddable scripting language
Copyright© 2007–2012 Gracjan Polak;
© 2012–2016 Ömer Sinan Ağacan;
© 2017-2024 Albert Krewinkel
LicenseMIT
MaintainerAlbert Krewinkel <tarleb@hslua.org>
Stabilitybeta
Portabilitynon-portable (depends on GHC)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lua.Ersatz.Auxiliary

Description

Raw bindings to ersatz functions of the auxiliary library.

Synopsis

Auxiliary Library

hsluaL_newstate :: IO State Source #

Creates a new Lua state and set extra registry values for error bookkeeping.

hsluaL_requiref Source #

Arguments

:: State 
-> Ptr CChar

modname

-> CFunction

openf

-> LuaBool

glb

-> Ptr StatusCode 
-> IO () 

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.