* Load raw bytes from ptr. * @param ptr The head address * @param numBytes The number
(ptr: Pointer, numBytes: number)
| 130 | * @param numBytes The number |
| 131 | */ |
| 132 | loadRawBytes(ptr: Pointer, numBytes: number): Uint8Array { |
| 133 | if (this.buffer != this.memory.buffer) { |
| 134 | this.updateViews(); |
| 135 | } |
| 136 | const result = new Uint8Array(numBytes); |
| 137 | result.set(this.viewU8.slice(ptr, ptr + numBytes)); |
| 138 | return result; |
| 139 | } |
| 140 | /** |
| 141 | * Load null-terminated C-string from ptr. |
| 142 | * @param ptr The head address |
no test coverage detected