Skip to content

Commit

Permalink
update CacheMsg.zig
Browse files Browse the repository at this point in the history
  • Loading branch information
zfl9 committed Jul 20, 2024
1 parent e3adc13 commit 7907e1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CacheMsg.zig
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pub fn get_ttl(self: *const CacheMsg) i32 {
// =======================================================

const Header = extern struct {
update_time: u64,
update_time: i64,
hashv: u32,
ttl: i32,
ttl_r: i32,
Expand Down Expand Up @@ -169,7 +169,7 @@ pub fn load(data: *[]const u8) ?*CacheMsg {
/// dump to db file
pub fn dump(self: *const CacheMsg, file: *cc.FILE) void {
const h: Header = .{
.update_time = @intCast(u64, self.update_time),
.update_time = cc.to_i64(self.update_time),
.hashv = self.hashv,
.ttl = self.ttl,
.ttl_r = self.ttl_r,
Expand Down

0 comments on commit 7907e1f

Please sign in to comment.