class CrystalLuaExample::LuaState
- CrystalLuaExample::LuaState
- Reference
- Object
Defined in:
crystal_lua_example/lua_state.crConstant Summary
-
ALLOC =
->(ud : ::Pointer(Void), ptr : ::Pointer(Void), osize : LibC::Int, nsize : LibC::Int) do if nsize > 0 GC.realloc(ptr, nsize) else GC.free(ptr) Pointer(Void).null end end
-
BUFFER_READER =
->(state : LibLua::LuaState, data : ::Pointer(Void), size : ::Pointer(LibC::Int)) do buffer = (data.as(::Pointer(Buffer))).value str = buffer.gets if str.nil? size.value = 0 Pointer(LibC::Char).null else size.value = str.bytesize str.to_unsafe end end
Constructors
Instance Method Summary
- #call(nargs : LibC::Int = 0, nresults : LibC::Int = 0)
- #getglobal(name : String)
- #load_string(source : String)
- #pushcfunction(cfun : LibLua::Cfunction)
- #register(name : String, cfun : LibLua::Cfunction)
- #setglobal(name : String)
- #to_unsafe : LibLua::LuaState
- #tostring(idx : LibC::Int)
- #version