diff options
| author | 2024-03-27 21:52:02 -0400 | |
|---|---|---|
| committer | 2024-03-27 21:52:02 -0400 | |
| commit | 4ce891a8ce5336da39180964792110e131756cdd (patch) | |
| tree | b4ff0180157bb49e15d2c36f2cf0cdaab1a24535 /src/NumericData.zig | |
| parent | Friendly general category methods (diff) | |
| download | zg-4ce891a8ce5336da39180964792110e131756cdd.tar.gz zg-4ce891a8ce5336da39180964792110e131756cdd.tar.xz zg-4ce891a8ce5336da39180964792110e131756cdd.zip | |
ScriptsData and made all Datas const
Diffstat (limited to 'src/NumericData.zig')
| -rw-r--r-- | src/NumericData.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/NumericData.zig b/src/NumericData.zig index baf8f11..210d623 100644 --- a/src/NumericData.zig +++ b/src/NumericData.zig | |||
| @@ -33,7 +33,7 @@ pub fn init(allocator: mem.Allocator) !Self { | |||
| 33 | return self; | 33 | return self; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | pub fn deinit(self: *Self) void { | 36 | pub fn deinit(self: *const Self) void { |
| 37 | self.allocator.free(self.s1); | 37 | self.allocator.free(self.s1); |
| 38 | self.allocator.free(self.s2); | 38 | self.allocator.free(self.s2); |
| 39 | } | 39 | } |
| @@ -59,7 +59,7 @@ pub inline fn isDecimal(self: Self, cp: u21) bool { | |||
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | test "isDecimal" { | 61 | test "isDecimal" { |
| 62 | var self = try init(testing.allocator); | 62 | const self = try init(testing.allocator); |
| 63 | defer self.deinit(); | 63 | defer self.deinit(); |
| 64 | 64 | ||
| 65 | try testing.expect(self.isNumber('\u{277f}')); | 65 | try testing.expect(self.isNumber('\u{277f}')); |