Hilbish/moonlight/export_clua.go

9 lines
222 B
Go
Raw Normal View History

2024-07-21 15:37:08 +00:00
//go:build midnight
package moonlight
func (mlr *Runtime) SetExports(tbl *Table, exports map[string]Export) {
for name, export := range exports {
tbl.SetField(name, FunctionValue(mlr.GoFunction(export.Function)))
}
}