Convert
| Kind | class |
| Package | psychlua |
| Full name | psychlua.Convert |
| Source | source/psychlua/Convert.hx |
Some borrowed code from hxluajit-wrapper. @see https://github.com/MAJigsaw77/hxluajit-wrapper/blob/main/hxluajit/wrapper/LuaConverter.hx
We didn't use hxluajit-wrapper because we wanted to have our functions and methods as similar as possible to linc_luajit
Public methods
addCallback
static function addCallback(l:State, name:String, func:Dynamic)
| Parameter | Type | Default |
|---|---|---|
l | State | — |
name | String | — |
func | Dynamic | — |
removeCallback
static function removeCallback(l:State, name:String)
| Parameter | Type | Default |
|---|---|---|
l | State | — |
name | String | — |
toLua
static function toLua(l:State, v:Dynamic):Bool
| Parameter | Type | Default |
|---|---|---|
l | State | — |
v | Dynamic | — |
fromLua
static function fromLua(l:State, idx:Int):Dynamic
| Parameter | Type | Default |
|---|---|---|
l | State | — |
idx | Int | — |
callFunctionWithoutName
static function callFunctionWithoutName(l:State, args:Array<Dynamic>):Array<Dynamic>
| Parameter | Type | Default |
|---|---|---|
l | State | — |
args | Array<Dynamic> | — |
Internals
Private / internal members
| Field | Type | Static |
|---|---|---|
funcs | — | yes |
callbacks | Map<String, Dynamic> | yes |
| Method |
|---|
static function convertTable(l:State, idx:Int):Dynamic |
static function iterateTable(l:State, idx:Int, fn:Void->Void):Void |
static function handleMethod(l:State):Int |
static function scriptForState(l:State):FunkinLua |
static function handleCallback(l:State):Int |