MCPcopy Index your code
hub / github.com/Shopify/go-lua / extendArray

Method extendArray

tables.go:39–51  ·  view source on GitHub ↗
(last int)

Source from the content-addressed store, hash-verified

37}
38
39func (t *table) extendArray(last int) {
40 t.array = append(t.array, make([]value, last-len(t.array))...)
41 for k, v := range t.hash {
42 if f, ok := k.(float64); ok {
43 if i := int(f); float64(i) == f {
44 if 0 < i && i <= len(t.array) {
45 t.array[i-1] = v
46 delete(t.hash, k)
47 }
48 }
49 }
50 }
51}
52
53func (t *table) atInt(k int) value {
54 if 0 < k && k <= len(t.array) {

Callers 3

maybeResizeArrayMethod · 0.95
initFunction · 0.80
executeSwitchMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected