mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
chore: upgrade zig to 0.14.0 (#17820)
Co-authored-by: 190n <7763597+190n@users.noreply.github.com> Co-authored-by: Zack Radisic <56137411+zackradisic@users.noreply.github.com> Co-authored-by: pfg <pfg@pfg.pw> Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
This commit is contained in:
@@ -232,7 +232,7 @@ pub const WTFStringImplStruct = extern struct {
|
||||
};
|
||||
|
||||
pub const StringImplAllocator = struct {
|
||||
fn alloc(ptr: *anyopaque, len: usize, _: u8, _: usize) ?[*]u8 {
|
||||
fn alloc(ptr: *anyopaque, len: usize, _: std.mem.Alignment, _: usize) ?[*]u8 {
|
||||
var this = bun.cast(WTFStringImpl, ptr);
|
||||
const len_ = this.byteLength();
|
||||
|
||||
@@ -247,14 +247,10 @@ pub const StringImplAllocator = struct {
|
||||
return @constCast(this.m_ptr.latin1);
|
||||
}
|
||||
|
||||
fn resize(_: *anyopaque, _: []u8, _: u8, _: usize, _: usize) bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
pub fn free(
|
||||
ptr: *anyopaque,
|
||||
buf: []u8,
|
||||
_: u8,
|
||||
_: std.mem.Alignment,
|
||||
_: usize,
|
||||
) void {
|
||||
var this = bun.cast(WTFStringImpl, ptr);
|
||||
@@ -265,7 +261,8 @@ pub const StringImplAllocator = struct {
|
||||
|
||||
pub const VTable = std.mem.Allocator.VTable{
|
||||
.alloc = &alloc,
|
||||
.resize = &resize,
|
||||
.resize = &std.mem.Allocator.noResize,
|
||||
.remap = &std.mem.Allocator.noRemap,
|
||||
.free = &free,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user