Skip to content

Commit

Permalink
Add isError function
Browse files Browse the repository at this point in the history
  • Loading branch information
leki75 committed Nov 6, 2024
1 parent ab7b49f commit b248fe4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/aeron.zig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ pub const PublicationResult = enum(c_long) {
max_position_exceeded = aeronC.AERON_PUBLICATION_MAX_POSITION_EXCEEDED,
other_error = aeronC.AERON_PUBLICATION_ERROR,
_,

pub fn isError(self: PublicationResult) bool {
return @intFromEnum(self) < 0;
}
};

fn err(e: c_int) !void {
Expand Down

0 comments on commit b248fe4

Please sign in to comment.