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

Method XMoveTo

_state.go:2012–2022  ·  view source on GitHub ↗
(other *LState, n int)

Source from the content-addressed store, hash-verified

2010}
2011
2012func (ls *LState) XMoveTo(other *LState, n int) {
2013 if ls == other {
2014 return
2015 }
2016 top := ls.GetTop()
2017 n = intMin(n, top)
2018 for i := n; i > 0; i-- {
2019 other.Push(ls.Get(top - i + 1))
2020 }
2021 ls.SetTop(top - n)
2022}
2023
2024/* }}} */
2025

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected