MCPcopy Index your code
hub / github.com/yuin/gopher-lua / CheckBool

Method CheckBool

auxlib.go:63–70  ·  view source on GitHub ↗
(n int)

Source from the content-addressed store, hash-verified

61}
62
63func (ls *LState) CheckBool(n int) bool {
64 v := ls.Get(n)
65 if lv, ok := v.(LBool); ok {
66 return bool(lv)
67 }
68 ls.TypeError(n, LTBool)
69 return false
70}
71
72func (ls *LState) CheckTable(n int) *LTable {
73 v := ls.Get(n)

Callers 1

TestCheckBoolFunction · 0.80

Calls 2

GetMethod · 0.95
TypeErrorMethod · 0.95

Tested by 1

TestCheckBoolFunction · 0.64