From cfea058d534fe96a6c2fc66fe72ae3c646eca6df Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Mon, 14 Jul 2025 18:10:57 -0500 Subject: [PATCH] add GoFunction to pushvalue --- wrapper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrapper.go b/wrapper.go index ab99210..1147a59 100644 --- a/wrapper.go +++ b/wrapper.go @@ -191,7 +191,6 @@ func (s *State) GetTableLength(index int) int { return int(C.get_table_length(s.L, C.int(index))) } -// Enhanced PushValue with comprehensive type support func (s *State) PushValue(v any) error { switch val := v.(type) { case nil: @@ -206,6 +205,8 @@ func (s *State) PushValue(v any) error { s.PushNumber(val) case string: s.PushString(val) + case GoFunction: + return s.PushGoFunction(val) case []int: return s.pushIntSlice(val) case []string: