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

Method RawGetH

table.go:295–312  ·  view source on GitHub ↗

RawGet returns an LValue associated with a given key without __index metamethod.

(key LValue)

Source from the content-addressed store, hash-verified

293
294// RawGet returns an LValue associated with a given key without __index metamethod.
295func (tb *LTable) RawGetH(key LValue) LValue {
296 if s, sok := key.(LString); sok {
297 if tb.strdict == nil {
298 return LNil
299 }
300 if v, vok := tb.strdict[string(s)]; vok {
301 return v
302 }
303 return LNil
304 }
305 if tb.dict == nil {
306 return LNil
307 }
308 if v, ok := tb.dict[key]; ok {
309 return v
310 }
311 return LNil
312}
313
314// RawGetString returns an LValue associated with a given key without __index metamethod.
315func (tb *LTable) RawGetString(key string) LValue {

Callers 2

NextMethod · 0.95
TestTableRawGetHFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestTableRawGetHFunction · 0.64