~turminal/hare

50a2907947fd8acdc282711eff6417b51560b558 — Byron Torres 6 months ago 2adeb13
time::chrono: make zoneindex type size
2 files changed, 3 insertions(+), 3 deletions(-)

M time/chrono/timezone.ha
M time/chrono/tzdb.ha
M time/chrono/timezone.ha => time/chrono/timezone.ha +1 -1
@@ 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).

M time/chrono/tzdb.ha => time/chrono/tzdb.ha +2 -2
@@ 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;
		};