MCPcopy Index your code
hub / github.com/Shopify/go-lua / CheckUserData

Function CheckUserData

auxiliary.go:285–291  ·  view source on GitHub ↗

CheckUserData checks whether the function argument at index is a userdata of the type name (see NewMetaTable) and returns the userdata (see ToUserData).

(l *State, index int, name string)

Source from the content-addressed store, hash-verified

283// of the type name (see NewMetaTable) and returns the userdata (see
284// ToUserData).
285func CheckUserData(l *State, index int, name string) interface{} {
286 if d := TestUserData(l, index, name); d != nil {
287 return d
288 }
289 typeError(l, index, name)
290 panic("unreachable")
291}
292
293// CheckType checks whether the function argument at index has type t. See Type for the encoding of types for t.
294func CheckType(l *State, index int, t Type) {

Callers 1

toStreamFunction · 0.85

Calls 2

TestUserDataFunction · 0.85
typeErrorFunction · 0.85

Tested by

no test coverage detected