| 883 | } |
| 884 | |
| 885 | void *fxSetHostChunk(txMachine* the, txSlot* slot, void* theValue, txSize theSize) |
| 886 | { |
| 887 | txSlot* host = fxCheckHostObject(the, slot); |
| 888 | if (host) { |
| 889 | host->flag |= XS_HOST_CHUNK_FLAG; |
| 890 | if (theSize) { |
| 891 | host->value.host.data = fxNewChunk(the, theSize); |
| 892 | if (theValue) |
| 893 | c_memcpy(host->value.host.data, theValue, theSize); |
| 894 | else |
| 895 | c_memset(host->value.host.data, 0, theSize); |
| 896 | } |
| 897 | else |
| 898 | host->value.host.data = NULL; |
| 899 | return host->value.host.data; |
| 900 | } |
| 901 | else |
| 902 | mxSyntaxError("C: fxSetHostChunk: not a host object"); |
| 903 | |
| 904 | return NULL; |
| 905 | } |
| 906 | |
| 907 | void fxSetHostData(txMachine* the, txSlot* slot, void* theData) |
| 908 | { |
no test coverage detected