| 108 | } |
| 109 | |
| 110 | void fxGetArrayBufferData(txMachine* the, txSlot* slot, txInteger byteOffset, void* data, txInteger byteLength) |
| 111 | { |
| 112 | txSlot* instance = fxCheckArrayBufferInstance(the, slot); |
| 113 | txSlot* arrayBuffer = instance->next; |
| 114 | txSlot* bufferInfo = arrayBuffer->next; |
| 115 | txInteger length = bufferInfo->value.bufferInfo.length; |
| 116 | if ((byteOffset < 0) || (length < byteOffset)) |
| 117 | mxRangeError("invalid byteOffset %ld", byteOffset); |
| 118 | if ((byteLength < 0) || (length < (byteOffset + byteLength))) |
| 119 | mxRangeError("invalid byteLength %ld", byteLength); |
| 120 | c_memcpy(data, arrayBuffer->value.arrayBuffer.address + byteOffset, byteLength); |
| 121 | } |
| 122 | |
| 123 | txInteger fxGetArrayBufferLength(txMachine* the, txSlot* slot) |
| 124 | { |
nothing calls this directly
no test coverage detected