(l *State, index int)
| 546 | } |
| 547 | |
| 548 | func LengthEx(l *State, index int) int { |
| 549 | l.Length(index) |
| 550 | if length, ok := l.ToInteger(-1); ok { |
| 551 | l.Pop(1) |
| 552 | return length |
| 553 | } |
| 554 | Errorf(l, "object length is not a number") |
| 555 | panic("unreachable") |
| 556 | } |
| 557 | |
| 558 | // FileResult produces the return values for file-related functions in the standard |
| 559 | // library (io.open, os.rename, file:seek, etc.). |