| 1357 | } |
| 1358 | |
| 1359 | void fxSetHostFunctionProperty(txMachine* the, txSlot* property, txCallback call, txInteger length, txID id) |
| 1360 | { |
| 1361 | txLinker* linker = (txLinker*)(the->context); |
| 1362 | if (linker->stripFlag) { |
| 1363 | property->kind = XS_HOST_FUNCTION_KIND; |
| 1364 | property->value.hostFunction.builder = fxNewLinkerBuilder(linker, call, length, id); |
| 1365 | property->value.hostFunction.profileID = fxGenerateProfileID(the); |
| 1366 | } |
| 1367 | else { |
| 1368 | txSlot* home = the->stack; |
| 1369 | txSlot* function = fxNewHostFunction(the, call, length, id, XS_NO_ID); |
| 1370 | txSlot* slot = mxFunctionInstanceHome(function); |
| 1371 | slot->value.home.object = home->value.reference; |
| 1372 | property->kind = the->stack->kind; |
| 1373 | property->value = the->stack->value; |
| 1374 | mxPop(); |
| 1375 | } |
| 1376 | } |
no test coverage detected