diff options
| author | 2024-04-02 13:22:37 -0400 | |
|---|---|---|
| committer | 2024-04-02 13:22:37 -0400 | |
| commit | cc8d110f834d112a230024122fddfcc6e0a67759 (patch) | |
| tree | a69b7ef8fa81f82b9ce9a16ce489b696d237e284 /src/unicode_tests.zig | |
| parent | Updated README with zig fetch (diff) | |
| download | zg-cc8d110f834d112a230024122fddfcc6e0a67759.tar.gz zg-cc8d110f834d112a230024122fddfcc6e0a67759.tar.xz zg-cc8d110f834d112a230024122fddfcc6e0a67759.zip | |
NormData init now takes pointer to uninitialized Self to avoid stack copy issues.
Diffstat (limited to 'src/unicode_tests.zig')
| -rw-r--r-- | src/unicode_tests.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/unicode_tests.zig b/src/unicode_tests.zig index 5442f63..448ce41 100644 --- a/src/unicode_tests.zig +++ b/src/unicode_tests.zig | |||
| @@ -17,8 +17,9 @@ test "Unicode normalization tests" { | |||
| 17 | defer arena.deinit(); | 17 | defer arena.deinit(); |
| 18 | var allocator = arena.allocator(); | 18 | var allocator = arena.allocator(); |
| 19 | 19 | ||
| 20 | const data = try Normalize.NormData.init(allocator); | 20 | var norm_data: Normalize.NormData = undefined; |
| 21 | const n = Normalize{ .norm_data = &data }; | 21 | try Normalize.NormData.init(&norm_data, allocator); |
| 22 | const n = Normalize{ .norm_data = &norm_data }; | ||
| 22 | 23 | ||
| 23 | var file = try fs.cwd().openFile("data/unicode/NormalizationTest.txt", .{}); | 24 | var file = try fs.cwd().openFile("data/unicode/NormalizationTest.txt", .{}); |
| 24 | defer file.close(); | 25 | defer file.close(); |