blackbox support - binary operations
| 560 | |
| 561 | /// blackbox support - binary operations |
| 562 | BOOLEAN pyobject_Op2(int op, leftv res, leftv arg1, leftv arg2) |
| 563 | { |
| 564 | PythonCastStatic<> lhs(arg1); |
| 565 | |
| 566 | switch(op) // built-in return types and special cases first |
| 567 | { |
| 568 | case '<': case '>': case EQUAL_EQUAL: case NOTEQUAL: case GE: case LE: |
| 569 | { |
| 570 | res->data = (void *)(long)(lhs.compare(op, PythonCastDynamic(arg2))); |
| 571 | res->rtyp = INT_CMD; |
| 572 | return FALSE; |
| 573 | } |
| 574 | case '.': case COLONCOLON: case ATTRIB_CMD: |
| 575 | return lhs.attr(get_attrib_name(arg2)).assign_to(res); |
| 576 | } |
| 577 | |
| 578 | PythonCastDynamic rhs(arg2); |
| 579 | if (!lhs(op, rhs).assign_to(res)) |
| 580 | return FALSE; |
| 581 | |
| 582 | BOOLEAN newstruct_Op2(int, leftv, leftv, leftv); // forward declaration |
| 583 | return newstruct_Op2(op, res, arg1, arg2); |
| 584 | |
| 585 | } |
| 586 | |
| 587 | /// blackbox support - ternary operations |
| 588 | BOOLEAN pyobject_Op3(int op, leftv res, leftv arg1, leftv arg2, leftv arg3) |
nothing calls this directly
no test coverage detected