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

Function finishProtectedCall

base.go:52–62  ·  view source on GitHub ↗
(l *State, status bool)

Source from the content-addressed store, hash-verified

50}
51
52func finishProtectedCall(l *State, status bool) int {
53 if !l.CheckStack(1) {
54 l.SetTop(0) // create space for return values
55 l.PushBoolean(false)
56 l.PushString("stack overflow")
57 return 2 // return false, message
58 }
59 l.PushBoolean(status) // first result (status)
60 l.Replace(1) // put first result in the first slot
61 return l.Top()
62}
63
64func protectedCallContinuation(l *State) int {
65 _, shouldYield, _ := l.Context()

Callers 2

base.goFile · 0.85

Calls 6

SetTopMethod · 0.80
PushBooleanMethod · 0.80
PushStringMethod · 0.80
ReplaceMethod · 0.80
TopMethod · 0.80
CheckStackMethod · 0.45

Tested by

no test coverage detected