summaryrefslogtreecommitdiff
path: root/src/NumericData.zig
diff options
context:
space:
mode:
authorGravatar Jose Colon Rodriguez2024-03-27 21:52:02 -0400
committerGravatar Jose Colon Rodriguez2024-03-27 21:52:02 -0400
commit4ce891a8ce5336da39180964792110e131756cdd (patch)
treeb4ff0180157bb49e15d2c36f2cf0cdaab1a24535 /src/NumericData.zig
parentFriendly general category methods (diff)
downloadzg-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.zig4
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
36pub fn deinit(self: *Self) void { 36pub 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
61test "isDecimal" { 61test "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}'));