| 137 | } |
| 138 | |
| 139 | void fxSetArrayBufferData(txMachine* the, txSlot* slot, txInteger byteOffset, void* data, txInteger byteLength) |
| 140 | { |
| 141 | txSlot* instance = fxCheckArrayBufferInstance(the, slot); |
| 142 | txSlot* arrayBuffer = instance->next; |
| 143 | txSlot* bufferInfo = arrayBuffer->next; |
| 144 | txInteger length = bufferInfo->value.bufferInfo.length; |
| 145 | if ((byteOffset < 0) || (length < byteOffset)) |
| 146 | mxRangeError("invalid byteOffset %ld", byteOffset); |
| 147 | if ((byteLength < 0) || (length < (byteOffset + byteLength))) |
| 148 | mxRangeError("invalid byteLength %ld", byteLength); |
| 149 | c_memcpy(arrayBuffer->value.arrayBuffer.address + byteOffset, data, byteLength); |
| 150 | } |
| 151 | |
| 152 | void fxSetArrayBufferLength(txMachine* the, txSlot* slot, txInteger target) |
| 153 | { |
nothing calls this directly
no test coverage detected