Skip to content

Commit

Permalink
Remove unused State helper methods
Browse files Browse the repository at this point in the history
  • Loading branch information
zombiezen committed Dec 1, 2024
1 parent e33ff3b commit f3afe35
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions internal/mylua/lua.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,21 +186,6 @@ func (l *State) AbsIndex(idx int) int {
return i - l.frame().registerStart() + 1
}

func (l *State) isValidIndex(idx int) bool {
if isPseudo(idx) {
return true
}
if idx < 0 {
idx = -idx
}
return 1 <= idx && idx <= l.Top()
}

func (l *State) isAcceptableIndex(idx int) bool {
l.init()
return l.isValidIndex(idx) || l.Top() <= idx && idx <= cap(l.stack)
}

// Top returns the index of the top element in the stack.
// Because indices start at 1,
// this result is equal to the number of elements in the stack;
Expand Down

0 comments on commit f3afe35

Please sign in to comment.