CallMeta calls a metamethod. If the object at index has a metatable and this metatable has a field event, this function calls this field passing the object as its only argument. In this case this function returns true and pushes onto the stack the value returned by the call. If there is no metatabl
(l *State, index int, event string)
| 101 | // returned by the call. If there is no metatable or no metamethod, this |
| 102 | // function returns false (without pushing any value on the stack). |
| 103 | func CallMeta(l *State, index int, event string) bool { |
| 104 | index = l.AbsIndex(index) |
| 105 | if !MetaField(l, index, event) { |
| 106 | return false |
| 107 | } |
| 108 | l.PushValue(index) |
| 109 | l.Call(1, 1) |
| 110 | return true |
| 111 | } |
| 112 | |
| 113 | // ArgumentError raises an error with a standard message that includes extraMessage as a comment. |
| 114 | // |
no test coverage detected