glua64

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: 0BSD Imports: 2 Imported by: 4

README

I64/U64 types for gopher-lua

Designed for use by:

  1. https://github.com/PeerDB-io/gluaflatbuffers
  2. https://github.com/PeerDB-io/peerdb

Includes a typed UserData helper type

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	I64 = UserDataType[int64]{Name: "flatbuffers_i64"}
	U64 = UserDataType[uint64]{Name: "flatbuffers_u64"}
)

Functions

func Loader

func Loader(ls *lua.LState) int

func Lua64Eq

func Lua64Eq(ls *lua.LState) int

func Lua64Le

func Lua64Le(ls *lua.LState) int

func Lua64Lt

func Lua64Lt(ls *lua.LState) int

func LuaI64Index

func LuaI64Index(ls *lua.LState) int

func LuaI64String

func LuaI64String(ls *lua.LState) int

func LuaU64Index

func LuaU64Index(ls *lua.LState) int

func LuaU64String

func LuaU64String(ls *lua.LState) int

Types

type UserDataType

type UserDataType[T any] struct{ Name string }

func (*UserDataType[T]) Check

func (udt *UserDataType[T]) Check(ls *lua.LState, idx int) (*lua.LUserData, T)

func (*UserDataType[T]) Metatable

func (udt *UserDataType[T]) Metatable(ls *lua.LState) lua.LValue

func (*UserDataType[T]) New

func (udt *UserDataType[T]) New(ls *lua.LState, val T) *lua.LUserData

func (*UserDataType[T]) NewMetatable

func (udt *UserDataType[T]) NewMetatable(ls *lua.LState) *lua.LTable

func (*UserDataType[T]) StartIndex

func (udt *UserDataType[T]) StartIndex(ls *lua.LState) (T, string)

func (*UserDataType[T]) StartMethod

func (udt *UserDataType[T]) StartMethod(ls *lua.LState) T

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL