diff options
| author | 2025-09-13 08:38:24 -0700 | |
|---|---|---|
| committer | 2025-09-14 01:48:41 -0700 | |
| commit | a3b5e884b12fdaa341010ef41bb9382fa0cd89f8 (patch) | |
| tree | 8bdd22c1c54da0b56ef6b9fe0dc4c2ca667b71a3 /src/CaseFolding.zig | |
| parent | Update build to 0.15.0 (diff) | |
| download | zg-a3b5e884b12fdaa341010ef41bb9382fa0cd89f8.tar.gz zg-a3b5e884b12fdaa341010ef41bb9382fa0cd89f8.tar.xz zg-a3b5e884b12fdaa341010ef41bb9382fa0cd89f8.zip | |
Update codebase to Zig 0.15.1.
Removes compression support
Diffstat (limited to 'src/CaseFolding.zig')
| -rw-r--r-- | src/CaseFolding.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/CaseFolding.zig b/src/CaseFolding.zig index ff41b3e..df86b92 100644 --- a/src/CaseFolding.zig +++ b/src/CaseFolding.zig | |||
| @@ -48,11 +48,9 @@ fn setupImpl(casefold: *CaseFolding, allocator: Allocator) Allocator.Error!void | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | inline fn setupImplInner(casefold: *CaseFolding, allocator: Allocator) !void { | 50 | inline fn setupImplInner(casefold: *CaseFolding, allocator: Allocator) !void { |
| 51 | const decompressor = compress.flate.inflate.decompressor; | ||
| 52 | const in_bytes = @embedFile("fold"); | 51 | const in_bytes = @embedFile("fold"); |
| 53 | var in_fbs = std.io.fixedBufferStream(in_bytes); | 52 | var in_fbs = std.io.fixedBufferStream(in_bytes); |
| 54 | var in_decomp = decompressor(.raw, in_fbs.reader()); | 53 | var reader = in_fbs.reader(); |
| 55 | var reader = in_decomp.reader(); | ||
| 56 | 54 | ||
| 57 | const endian = builtin.cpu.arch.endian(); | 55 | const endian = builtin.cpu.arch.endian(); |
| 58 | 56 | ||
| @@ -123,7 +121,7 @@ pub fn caseFoldAlloc( | |||
| 123 | allocator: Allocator, | 121 | allocator: Allocator, |
| 124 | cps: []const u21, | 122 | cps: []const u21, |
| 125 | ) Allocator.Error![]const u21 { | 123 | ) Allocator.Error![]const u21 { |
| 126 | var cfcps = std.ArrayList(u21).init(allocator); | 124 | var cfcps = std.array_list.Managed(u21).init(allocator); |
| 127 | defer cfcps.deinit(); | 125 | defer cfcps.deinit(); |
| 128 | var buf: [3]u21 = undefined; | 126 | var buf: [3]u21 = undefined; |
| 129 | 127 | ||