MCPcopy Create free account
hub / github.com/yuin/gopher-lua / closeUpvalues

Method closeUpvalues

state.go:931–946  ·  view source on GitHub ↗
(idx int)

Source from the content-addressed store, hash-verified

929}
930
931func (ls *LState) closeUpvalues(idx int) { // +inline-start
932 if ls.uvcache != nil {
933 var prev *Upvalue
934 for uv := ls.uvcache; uv != nil; uv = uv.next {
935 if uv.index >= idx {
936 if prev != nil {
937 prev.next = nil
938 } else {
939 ls.uvcache = nil
940 }
941 uv.Close()
942 }
943 prev = uv
944 }
945 }
946} // +inline-end
947
948func (ls *LState) findUpvalue(idx int) *Upvalue {
949 var prev *Upvalue

Callers 1

closeAllUpvaluesMethod · 0.95

Calls 1

CloseMethod · 0.45

Tested by

no test coverage detected