summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-04-02 13:22:37 -0400
committerGravatar Jose Colon Rodriguez2024-04-02 13:22:37 -0400
commitcc8d110f834d112a230024122fddfcc6e0a67759 (patch)
treea69b7ef8fa81f82b9ce9a16ce489b696d237e284 /README.md
parentUpdated README with zig fetch (diff)
downloadzg-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 'README.md')
-rw-r--r--README.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.md b/README.md
index 4df0112..df167f6 100644
--- a/README.md
+++ b/README.md
@@ -282,7 +282,8 @@ const Normalize = @import("Normalize");
282 282
283test "Normalization" { 283test "Normalization" {
284 // We need lots of Unicode dta for normalization. 284 // We need lots of Unicode dta for normalization.
285 var norm_data = try Normalize.NormData.init(allocator); 285 var norm_data: Normalize.NormData = undefined;
286 try Normalize.NormData.init(&norm_data, allocator);
286 defer norm_data.deinit(); 287 defer norm_data.deinit();
287 288
288 // The `Normalize` structure takes a pointer to the data. 289 // The `Normalize` structure takes a pointer to the data.
@@ -335,7 +336,8 @@ const CaseFold = @import("CaseFold");
335 336
336test "Caseless matching" { 337test "Caseless matching" {
337 // We need to normalize during the matching process. 338 // We need to normalize during the matching process.
338 var norm_data = try Normalize.NormData.init(allocator); 339 var norm_data: Normalize.NormData = undefined;
340 try Normalize.NormData.init(&norm_data, allocator);
339 defer norm_data.deinit(); 341 defer norm_data.deinit();
340 const n = Normalize{ .norm_data = &norm_data }; 342 const n = Normalize{ .norm_data = &norm_data };
341 343