diff --git a/lib/miniaudio/build.zig.zon b/lib/miniaudio/build.zig.zon index ef612aa..a16414a 100644 --- a/lib/miniaudio/build.zig.zon +++ b/lib/miniaudio/build.zig.zon @@ -1,8 +1,9 @@ .{ - .name = "miniaudio", + .name = .miniaudio, .version = "0.0.0", .dependencies = .{}, .paths = .{ "", }, + .fingerprint = 0xaeac616fa937921a, } diff --git a/lib/nfd/build.zig.zon b/lib/nfd/build.zig.zon index a9ccd9c..78288bb 100644 --- a/lib/nfd/build.zig.zon +++ b/lib/nfd/build.zig.zon @@ -1,8 +1,9 @@ .{ - .name = "nfd", + .name = .nfd, .version = "0.0.0", .dependencies = .{ .p2 = .{ .path = "../p2" } }, .paths = .{ "", }, + .fingerprint = 0xc4705658dee6a489, } diff --git a/lib/p2/src/p2.zig b/lib/p2/src/p2.zig index ca7fe0b..dcee56e 100644 --- a/lib/p2/src/p2.zig +++ b/lib/p2/src/p2.zig @@ -73,14 +73,14 @@ pub const Span = spans.Span; pub const shell = @import("utils/shell.zig"); comptime { - // std.testing.refAllDecls(utils); - // std.testing.refAllDecls(static_structures); - // std.testing.refAllDecls(ring_queue); - // std.testing.refAllDecls(sparse_set); - // std.testing.refAllDecls(stack_structures); - // std.testing.refAllDecls(index_pool); - // std.testing.refAllDecls(concurrent_queue); - // std.testing.refAllDecls(string_pool); + std.testing.refAllDecls(utils); + std.testing.refAllDecls(static_structures); + std.testing.refAllDecls(ring_queue); + std.testing.refAllDecls(sparse_set); + std.testing.refAllDecls(stack_structures); + std.testing.refAllDecls(index_pool); + std.testing.refAllDecls(concurrent_queue); + std.testing.refAllDecls(string_pool); std.testing.refAllDecls(spans); } diff --git a/lib/p2/src/structures/concurrent-queue.zig b/lib/p2/src/structures/concurrent-queue.zig index 90355d1..e79d05e 100644 --- a/lib/p2/src/structures/concurrent-queue.zig +++ b/lib/p2/src/structures/concurrent-queue.zig @@ -36,7 +36,7 @@ pub fn ConcurrentQueueUnmanagedAdvanced(comptime T: type, comptime opts: struct // tail points to next free slot // head points to the next one to pop pub fn initCapacity(allocator: std.mem.Allocator, cap: usize) !@This() { - const new = .{ + const new = @This(){ .data = try allocator.alloc(T, cap + 1), .status = try allocator.alloc(Atomic(bool), cap + 1), .head = Atomic(usize).init(0), diff --git a/lib/p2/src/structures/index-pool.zig b/lib/p2/src/structures/index-pool.zig index 68f560f..66705a5 100644 --- a/lib/p2/src/structures/index-pool.zig +++ b/lib/p2/src/structures/index-pool.zig @@ -161,7 +161,7 @@ test "index pool test" { } // Insert 1 randomly add and delete objects another million objects in groups - var prng = std.rand.DefaultPrng.init(0x1234); + var prng = std.Random.DefaultPrng.init(0x1234); var rand = prng.random(); var workBuffer: [5]Handle = .{ .{}, .{}, .{}, .{}, .{} }; diff --git a/lib/p2/src/structures/string-pool.zig b/lib/p2/src/structures/string-pool.zig index 55d82d9..dad774b 100644 --- a/lib/p2/src/structures/string-pool.zig +++ b/lib/p2/src/structures/string-pool.zig @@ -92,7 +92,6 @@ const StringAllocation = struct { const rc: [*]std.atomic.Value(u8) = @ptrCast(self.ptr); //+= 1; if (rc[3].fetchSub(1, .release) == 1) { - rc[3].fence(.acquire); return true; } @@ -203,7 +202,7 @@ const Bucket = struct { return rv; } else { - const index = self.freeSlots.pop(); + const index = self.freeSlots.pop().?; const rv: BucketAllocation = .{ .bytes = self.indexToSlot(self.i2p(index), self.ibp(index)),