2
2
mirror of https://github.com/Hilbis/Hilbish synced 2025-07-01 16:52:03 +00:00
Hilbish/moonlight/userdata_golua.go
2025-06-15 12:27:36 -04:00

22 lines
324 B
Go

//go:build !midnight
package moonlight
import (
rt "github.com/arnodel/golua/runtime"
)
type UserData struct {
ud *rt.UserData
}
func NewUserData(v interface{}, meta *Table) *UserData {
return &UserData{
ud: rt.NewUserData(v, meta.lt),
}
}
func UserDataValue(u *UserData) Value {
return rt.UserDataValue(u.ud)
}