From cc8d110f834d112a230024122fddfcc6e0a67759 Mon Sep 17 00:00:00 2001 From: Jose Colon Rodriguez Date: Tue, 2 Apr 2024 13:22:37 -0400 Subject: NormData init now takes pointer to uninitialized Self to avoid stack copy issues. --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'README.md') 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"); test "Normalization" { // We need lots of Unicode dta for normalization. - var norm_data = try Normalize.NormData.init(allocator); + var norm_data: Normalize.NormData = undefined; + try Normalize.NormData.init(&norm_data, allocator); defer norm_data.deinit(); // The `Normalize` structure takes a pointer to the data. @@ -335,7 +336,8 @@ const CaseFold = @import("CaseFold"); test "Caseless matching" { // We need to normalize during the matching process. - var norm_data = try Normalize.NormData.init(allocator); + var norm_data: Normalize.NormData = undefined; + try Normalize.NormData.init(&norm_data, allocator); defer norm_data.deinit(); const n = Normalize{ .norm_data = &norm_data }; -- cgit v1.2.3