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

Method forceResize

state.go:400–404  ·  view source on GitHub ↗

+inline-end

(newSize int)

Source from the content-addressed store, hash-verified

398} // +inline-end
399
400func (rg *registry) forceResize(newSize int) {
401 newSlice := make([]LValue, newSize)
402 copy(newSlice, rg.array[:rg.top]) // should we copy the area beyond top? there shouldn't be any valid values there so it shouldn't be necessary.
403 rg.array = newSlice
404}
405
406func (rg *registry) SetTop(topi int) { // +inline-start
407 // this section is inlined by go-inline

Callers 2

resizeMethod · 0.95
raiseErrorMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected