| 64 | } |
| 65 | |
| 66 | txSlot* fxArgToCallback(txMachine* the, txInteger argi) |
| 67 | { |
| 68 | if (mxArgc > argi) { |
| 69 | txSlot* slot = mxArgv(argi); |
| 70 | if (slot->kind == XS_REFERENCE_KIND) { |
| 71 | txSlot* instance = slot->value.reference; |
| 72 | again: |
| 73 | if (instance) { |
| 74 | txSlot* exotic = instance->next; |
| 75 | if (exotic && (exotic->flag & XS_INTERNAL_FLAG)) { |
| 76 | if (((exotic->kind == XS_CALLBACK_KIND) || (exotic->kind == XS_CALLBACK_X_KIND) || (exotic->kind == XS_CODE_KIND) || (exotic->kind == XS_CODE_X_KIND))) |
| 77 | return slot; |
| 78 | if (exotic->kind == XS_PROXY_KIND) { |
| 79 | instance = exotic->value.proxy.target; |
| 80 | goto again; |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | #if mxHostFunctionPrimitive |
| 86 | if (slot->kind == XS_HOST_FUNCTION_KIND) |
| 87 | return slot; |
| 88 | #endif |
| 89 | } |
| 90 | mxTypeError("callback: not a function"); |
| 91 | return C_NULL; |
| 92 | } |
| 93 | |
| 94 | void fxBufferFrameName(txMachine* the, txString buffer, txSize size, txSlot* frame, txString suffix) |
| 95 | { |
no outgoing calls
no test coverage detected