Function
objectRational
(L *LState, lhs, rhs LValue, event string)
Source from the content-addressed store, hash-verified
| 2449 | } |
| 2450 | |
| 2451 | func objectRational(L *LState, lhs, rhs LValue, event string) int { |
| 2452 | m1 := L.metaOp1(lhs, event) |
| 2453 | m2 := L.metaOp1(rhs, event) |
| 2454 | if m1.Type() == LTFunction && m1 == m2 { |
| 2455 | L.reg.Push(m1) |
| 2456 | L.reg.Push(lhs) |
| 2457 | L.reg.Push(rhs) |
| 2458 | L.Call(2, 1) |
| 2459 | if LVAsBool(L.reg.Pop()) { |
| 2460 | return 1 |
| 2461 | } |
| 2462 | return 0 |
| 2463 | } |
| 2464 | return -1 |
| 2465 | } |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…