summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--NEWS.md3
-rw-r--r--README.md4
-rw-r--r--build.zig7
-rw-r--r--src/code_point.zig6
4 files changed, 7 insertions, 13 deletions
diff --git a/NEWS.md b/NEWS.md
index 9538017..bb62e34 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -10,7 +10,8 @@ kept in static memory, where it should be.
10 10
11With compression gone in the last release, the inconvenience and startup 11With compression gone in the last release, the inconvenience and startup
12penalty of moving the data, already present _in_ static memory, over to 12penalty of moving the data, already present _in_ static memory, over to
13the heap, was purely wasted effort. Just CPU head. So that's gone. 13the heap, was purely wasted effort. Just CPU heat and extra clock time.
14So that's gone.
14 15
1590% of the work here was done by Jacob Sandlund, who went on to write 1690% of the work here was done by Jacob Sandlund, who went on to write
16his own rather interesting Unicode library, [uucode][uucode], which you 17his own rather interesting Unicode library, [uucode][uucode], which you
diff --git a/README.md b/README.md
index fd46cab..955414f 100644
--- a/README.md
+++ b/README.md
@@ -579,7 +579,7 @@ const Scripts = @import("Scripts");
579 579
580test "Scripts" { 580test "Scripts" {
581 // To see the full list of Scripts, look at the 581 // To see the full list of Scripts, look at the
582 // `src/Scripts.zig` file. They are list in an enum. 582 // `src/Scripts.zig` file. They are listed as an enum.
583 try expect(Scripts.script('A') == .Latin); 583 try expect(Scripts.script('A') == .Latin);
584 try expect(Scripts.script('Ω') == .Greek); 584 try expect(Scripts.script('Ω') == .Greek);
585 try expect(Scripts.script('צ') == .Hebrew); 585 try expect(Scripts.script('צ') == .Hebrew);
@@ -621,7 +621,7 @@ the fragment (`CodePoint` uses a `u3` for length, actually).
6214GiB is a lot of string. There are a few reasons to work with that much 6214GiB is a lot of string. There are a few reasons to work with that much
622string, log files primarily, but fewer to bring it all into memory at 622string, log files primarily, but fewer to bring it all into memory at
623once, and practically no reason at all to do anything to such a string 623once, and practically no reason at all to do anything to such a string
624without breaking it into smaller piece to work with. 624without breaking it into smaller pieces to work with.
625 625
626Also, Zig compiles on 32 bit systems, where `usize` is a `u32`. Code 626Also, Zig compiles on 32 bit systems, where `usize` is a `u32`. Code
627running on such systems has no choice but to handle slices in smaller 627running on such systems has no choice but to handle slices in smaller
diff --git a/build.zig b/build.zig
index 694d887..ac3ca77 100644
--- a/build.zig
+++ b/build.zig
@@ -532,13 +532,6 @@ pub fn build(b: *std.Build) void {
532 532
533 const run_unicode_tests = b.addRunArtifact(unicode_tests); 533 const run_unicode_tests = b.addRunArtifact(unicode_tests);
534 534
535 const test_unicode_step = b.step("unicode", "Rune unicode tests");
536 test_unicode_step.dependOn(&run_unicode_tests.step);
537 test_unicode_step.dependOn(&display_width_tr.step);
538 test_unicode_step.dependOn(&words_tr.step);
539 test_unicode_step.dependOn(&norm_tr.step);
540 test_unicode_step.dependOn(&case_fold_tr.step);
541
542 const test_step = b.step("test", "Run all module tests"); 535 const test_step = b.step("test", "Run all module tests");
543 test_step.dependOn(&run_unicode_tests.step); 536 test_step.dependOn(&run_unicode_tests.step);
544 test_step.dependOn(&code_point_tr.step); 537 test_step.dependOn(&code_point_tr.step);
diff --git a/src/code_point.zig b/src/code_point.zig
index 5f6c61c..2332c8b 100644
--- a/src/code_point.zig
+++ b/src/code_point.zig
@@ -31,7 +31,7 @@ pub const CodePoint = struct {
31/// Use `decodeAtIndex` or `decodeAtCursor`. 31/// Use `decodeAtIndex` or `decodeAtCursor`.
32pub fn decode(bytes: []const u8, offset: uoffset) ?CodePoint { 32pub fn decode(bytes: []const u8, offset: uoffset) ?CodePoint {
33 _ = .{ bytes, offset }; 33 _ = .{ bytes, offset };
34 @compileError("decode has been removed, use `decodeAtIndex`."); 34 @compileError("decode has been removed, use `decodeAtIndex` or `decodeAtCursor`.");
35} 35}
36 36
37/// Return the codepoint at `index`, even if `index` is in the middle 37/// Return the codepoint at `index`, even if `index` is in the middle
@@ -211,8 +211,8 @@ pub const Iterator = struct {
211// speed increase in exchange. 211// speed increase in exchange.
212// 212//
213// Credit for the algorithm goes to Björn Höhrmann, who wrote it up at 213// Credit for the algorithm goes to Björn Höhrmann, who wrote it up at
214// https://bjoern.hoehrmann.de/utf-8/decoder/dfa/ . The original 214// https://bjoern.hoehrmann.de/utf-8/decoder/dfa/. The license to the
215// license may be found in the ./credits folder. 215// original code may be found in the ./credits folder.
216// 216//
217 217
218/// Successful codepoint parse 218/// Successful codepoint parse