MCPcopy Create free account
hub / github.com/copernet/copernicus / Top

Method Top

util/stack.go:79–85  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

77}
78
79func (s *Stack) Top(i int) interface{} {
80 stackLen := s.Size()
81 if stackLen+i > stackLen-1 || stackLen+i < 0 {
82 return nil
83 }
84 return s.array[stackLen+i]
85}
86
87func (s *Stack) SetTop(i int, value interface{}) bool {
88 stackLen := s.Size()

Callers 3

VerifyScriptFunction · 0.95
EvalScriptFunction · 0.95
TestStackFunction · 0.95

Calls 1

SizeMethod · 0.95

Tested by 1

TestStackFunction · 0.76