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)
| 283 | // of the type name (see NewMetaTable) and returns the userdata (see |
| 284 | // ToUserData). |
| 285 | func 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. |
| 294 | func CheckType(l *State, index int, t Type) { |
no test coverage detected