commit 50a2907947fd8acdc282711eff6417b51560b558
parent 2adeb130542f0a75c72c9c75c3e06579c23b6b11
Author: Byron Torres <b@torresjrjr.com>
Date: Sun, 7 Apr 2024 16:14:12 +0100
time::chrono: make zoneindex type size
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/time/chrono/timezone.ha b/time/chrono/timezone.ha
@@ -57,7 +57,7 @@ export type zone = struct {
// A [[timezone]] transition between two [[zone]]s.
export type transition = struct {
when: time::instant,
- zoneindex: int,
+ zoneindex: size,
};
// A destructured dual std/dst POSIX timezone. See tzset(3).
diff --git a/time/chrono/tzdb.ha b/time/chrono/tzdb.ha
@@ -248,8 +248,8 @@ fn load_tzif(h: io::handle, tz: *timezone) (void | invalidtzif | io::error) = {
// assemble transitions
let transitions: []transition = [];
for (let i = 0z; i < timecnt; i += 1) {
- const zoneindex = zone_indicies[i]: int;
- if (zoneindex < 0 || zoneindex > (typecnt: int - 1)) {
+ const zoneindex = zone_indicies[i];
+ if (zoneindex < 0 || zoneindex > (typecnt - 1)) {
return invalidtzif;
};