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

Method RawGetInt

table.go:283–292  ·  view source on GitHub ↗

RawGetInt returns an LValue at position `key` without __index metamethod.

(key int)

Source from the content-addressed store, hash-verified

281
282// RawGetInt returns an LValue at position `key` without __index metamethod.
283func (tb *LTable) RawGetInt(key int) LValue {
284 if tb.array == nil {
285 return LNil
286 }
287 index := int(key) - 1
288 if index >= len(tb.array) || index < 0 {
289 return LNil
290 }
291 return tb.array[index]
292}
293
294// RawGet returns an LValue associated with a given key without __index metamethod.
295func (tb *LTable) RawGetH(key LValue) LValue {

Callers 9

TestTableInsertFunction · 0.45
TestTableRawSetIntFunction · 0.45
ipairsauxFunction · 0.45
baseUnpackFunction · 0.45
loRequireFunction · 0.45
fileDefOutFunction · 0.45
fileDefInFunction · 0.45
tableConcatFunction · 0.45
channelSelectFunction · 0.45

Calls

no outgoing calls

Tested by 2

TestTableInsertFunction · 0.36
TestTableRawSetIntFunction · 0.36