Actions */
| 5643 | |
| 5644 | /* Actions */ |
| 5645 | void |
| 5646 | TSActionCancel(TSAction actionp) |
| 5647 | { |
| 5648 | Action *thisaction; |
| 5649 | INKContInternal *i; |
| 5650 | |
| 5651 | // Nothing to cancel |
| 5652 | if (actionp == nullptr) { |
| 5653 | return; |
| 5654 | } |
| 5655 | |
| 5656 | /* This is a hack. Should be handled in ink_types */ |
| 5657 | if (reinterpret_cast<uintptr_t>(actionp) & 0x1) { |
| 5658 | thisaction = reinterpret_cast<Action *>(reinterpret_cast<uintptr_t>(actionp) - 1); |
| 5659 | if (thisaction) { |
| 5660 | i = static_cast<INKContInternal *>(thisaction->continuation); |
| 5661 | i->handle_event_count(EVENT_IMMEDIATE); |
| 5662 | } else { // The action pointer for an INKContInternal was effectively null, just go away |
| 5663 | return; |
| 5664 | } |
| 5665 | } else { |
| 5666 | thisaction = reinterpret_cast<Action *>(actionp); |
| 5667 | } |
| 5668 | |
| 5669 | thisaction->cancel(); |
| 5670 | } |
| 5671 | |
| 5672 | // Currently no error handling necessary, actionp can be anything. |
| 5673 | int |