Removed unnecessary function parameter
This commit is contained in:
parent
feed1d5d43
commit
28a2d54089
1 changed files with 2 additions and 2 deletions
4
pkg.go
4
pkg.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue