mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
[bun.js] Bun.write for macOS
This commit is contained in:
@@ -1868,6 +1868,10 @@ pub const ArrayBuffer = extern struct {
|
||||
return this.ptr[this.offset .. this.offset + this.len];
|
||||
}
|
||||
|
||||
pub inline fn byteSlice(this: *const @This()) []u8 {
|
||||
return this.ptr[this.offset .. this.offset + this.byte_len];
|
||||
}
|
||||
|
||||
pub inline fn asU16(this: *const @This()) []u16 {
|
||||
return std.mem.bytesAsSlice(u16, @alignCast(@alignOf([*]u16), this.ptr[this.offset..this.byte_len]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user