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

Method XMoveTo

state.go:2225–2235  ·  view source on GitHub ↗
(other *LState, n int)

Source from the content-addressed store, hash-verified

2223}
2224
2225func (ls *LState) XMoveTo(other *LState, n int) {
2226 if ls == other {
2227 return
2228 }
2229 top := ls.GetTop()
2230 n = intMin(n, top)
2231 for i := n; i > 0; i-- {
2232 other.Push(ls.Get(top - i + 1))
2233 }
2234 ls.SetTop(top - n)
2235}
2236
2237/* }}} */
2238

Callers 3

switchToParentThreadFunction · 0.45
coResumeFunction · 0.45
switchToParentThreadFunction · 0.45

Calls 5

GetTopMethod · 0.95
GetMethod · 0.95
SetTopMethod · 0.95
intMinFunction · 0.85
PushMethod · 0.65

Tested by

no test coverage detected