aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-08-17 14:25:18 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-08-17 18:16:03 -0700
commit7ef1eb1c27754cb0349fdc10db1f02ff2dddd99b (patch)
tree6a76839d8be347648741e17f50d6c70d8313adc3 /lib/std/math.zig
parent8c1329b222ab620d7388d766e9e558baa502ce93 (diff)
downloadzig-7ef1eb1c27754cb0349fdc10db1f02ff2dddd99b.tar.gz
zig-7ef1eb1c27754cb0349fdc10db1f02ff2dddd99b.zip
InternPool: safer enum API
The key changes in this commit are: ```diff - names: []const NullTerminatedString, + names: NullTerminatedString.Slice, - values: []const Index, + values: Index.Slice, ``` Which eliminates the slices from `InternPool.Key.EnumType` and replaces them with structs that contain `start` and `len` indexes. This makes the lifetime of `EnumType` change from expiring with updates to InternPool, to expiring when the InternPool is garbage-collected, which is currently never. This is gearing up for a larger change I started working on locally which moves union types into InternPool. As a bonus, I fixed some unnecessary instances of `@as`.
Diffstat (limited to 'lib/std/math.zig')
0 files changed, 0 insertions, 0 deletions