From 9529292821323d51f9f19febf01093d1b6614f4e Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Fri, 1 Aug 2025 20:52:52 -0500 Subject: [PATCH] add PushLuaFunction to functions --- functions.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions.go b/functions.go index 9c37313..aed46f7 100644 --- a/functions.go +++ b/functions.go @@ -302,3 +302,8 @@ func (s *State) GetAllLuaFunctions(names ...string) (map[string]*LuaFunction, er } return funcs, nil } + +// PushLuaFunction pushes a stored LuaFunction reference onto the stack +func (s *State) PushLuaFunction(lf *LuaFunction) { + C.lua_rawgeti(s.L, C.LUA_REGISTRYINDEX, C.int(lf.ref)) +}