From 28a2d540892ba252bceadc7ec4d3978f32b08b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Thu, 8 May 2025 14:47:13 +0200 Subject: [PATCH] Removed unnecessary function parameter --- pkg.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg.go b/pkg.go index c0dc9b0..c002e76 100644 --- a/pkg.go +++ b/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 }