From 19aa9d93de0971513b1ff94ab72b54c7c2031dda Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 25 Aug 2023 07:13:14 +0800 Subject: update zig to 0.11.0 (#4233) * WIP * backup * more change * json related error sovled * number related issue solved * revert WriterType changed before * destroy -> free * jsonStringify related issues solved * fix mem.free expected []T or *[_]T, passed [*]const u8 * fix expected []T or *[_]T, passed [*:0]const u8 * fix build script * fix build script, for real * replace 0.11.0-dev.4006+bf827d0b5 to 0.12.0-dev.161+6a5463951 * fix build on macOS, COPYFILE.DATA -> COPYFILE_DATA * fix the last destroy on [*]ptr issue --------- Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> --- src/bun.js/api/server.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bun.js/api/server.zig') diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig index e96135a5e..64a85d6a4 100644 --- a/src/bun.js/api/server.zig +++ b/src/bun.js/api/server.zig @@ -5131,7 +5131,7 @@ pub fn NewServer(comptime NamespaceType: type, comptime ssl_enabled_: bool, comp this.cached_protocol.deref(); if (this.config.hostname) |host| { - bun.default_allocator.destroy(host); + bun.default_allocator.free(host[0 .. std.mem.len(host) + 1]); } if (this.config.base_url.href.len > 0) { -- cgit v1.2.3