mirror of
https://github.com/Hilbis/Hilbish
synced 2025-07-01 16:52:03 +00:00
22 lines
324 B
Go
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)
|
|
}
|