working on example
Some checks failed
Build / build (push) Failing after 36s
Test / build (push) Failing after 55s

This commit is contained in:
2026-01-21 00:35:48 +01:00
parent df711a196a
commit c5225e3a45
8 changed files with 171 additions and 124 deletions

View File

@@ -85,10 +85,7 @@ pub const Value = union(Type) {
pub inline fn getCompositeDataOrNull(self: *const Value) ?[]Value {
return switch (self.*) {
.Vector => |v| v,
.Matrix => |m| m,
.Array => |a| a,
.Structure => |s| s,
.Vector, .Matrix, .Array, .Structure => |v| v,
else => null,
};
}
@@ -181,19 +178,7 @@ pub const Value = union(Type) {
fn deinit(self: *Value, allocator: std.mem.Allocator) void {
switch (self.*) {
.Vector => |values| {
for (values) |*value| value.deinit(allocator);
allocator.free(values);
},
.Matrix => |values| {
for (values) |*value| value.deinit(allocator);
allocator.free(values);
},
.Array => |values| {
for (values) |*value| value.deinit(allocator);
allocator.free(values);
},
.Structure => |values| {
.Vector, .Matrix, .Array, .Structure => |values| {
for (values) |*value| value.deinit(allocator);
allocator.free(values);
},