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

Method metaOp2

_state.go:910–924  ·  view source on GitHub ↗
(value1, value2 LValue, event string)

Source from the content-addressed store, hash-verified

908}
909
910func (ls *LState) metaOp2(value1, value2 LValue, event string) LValue {
911 if mt := ls.metatable(value1, true); mt != LNil {
912 if tb, ok := mt.(*LTable); ok {
913 if ret := tb.RawGetString(event); ret != LNil {
914 return ret
915 }
916 }
917 }
918 if mt := ls.metatable(value2, true); mt != LNil {
919 if tb, ok := mt.(*LTable); ok {
920 return tb.RawGetString(event)
921 }
922 }
923 return LNil
924}
925
926func (ls *LState) metaCall(lvalue LValue) (*LFunction, bool) {
927 if fn, ok := lvalue.(*LFunction); ok {

Callers

nothing calls this directly

Calls 2

metatableMethod · 0.95
RawGetStringMethod · 0.80

Tested by

no test coverage detected