Removed unnecessary function parameter

This commit is contained in:
Magnus Åhall 2025-05-08 14:47:13 +02:00
parent feed1d5d43
commit 28a2d54089

4
pkg.go
View file

@ -19,12 +19,12 @@ func NewLUA() (lua LUA) {
return
}
func (l *LUA) SetStructInLUA(L *gopherLua.LState, varname string, strct any) (ltable gopherLua.LValue, err error) {
func (l *LUA) SetStructInLUA(varname string, strct any) (ltable gopherLua.LValue, err error) {
// JSON is used as a communications layer.
j, _ := json.Marshal(strct)
// JSON is decoded to a Lua table.
ltable, err = luaJSON.Decode(L, j)
ltable, err = luaJSON.Decode(l.state, j)
if err != nil {
return
}