Skip to content

Commit 13878b2

Browse files
committed
Rename Name to ProtocolName
1 parent 0062a2c commit 13878b2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Graph.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ pub fn initWithFsm(allocator: std.mem.Allocator, comptime State_: type) !Graph {
438438
return .{
439439
.arena = arena,
440440
.edges = edges,
441-
.name = @TypeOf(State_.info).Name,
441+
.name = @TypeOf(State_.info).ProtocolName,
442442
.nodes = nodes,
443443
};
444444
}

src/root.zig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const meta = std.meta;
33
pub const Graph = @import("Graph.zig");
44

55
pub fn ProtocolInfo(
6-
comptime Name_: []const u8,
6+
comptime ProtocolName_: []const u8,
77
comptime Role_: type,
88
comptime context_: anytype,
99
comptime internal_roles_: []const Role_,
@@ -26,7 +26,7 @@ pub fn ProtocolInfo(
2626
sender: Role_,
2727
receiver: []const Role_,
2828

29-
pub const Name = Name_;
29+
pub const ProtocolName = ProtocolName_;
3030
pub const Role = Role_;
3131
pub const context = context_;
3232
pub const internal_roles: []const Role_ = internal_roles_;
@@ -69,7 +69,7 @@ pub const Exit = union(enum) {
6969
pub const info: Info = .{};
7070

7171
pub const Info = struct {
72-
pub const Name = "polysession_exit";
72+
pub const ProtocolName = "polysession_exit";
7373
pub const Role = void;
7474
pub const Context = void;
7575
};
@@ -129,7 +129,7 @@ fn TypeSet(comptime bucket_count: usize) type {
129129
pub fn reachableStates(comptime State: type) struct { states: []const type, state_machine_names: []const []const u8 } {
130130
comptime {
131131
var states: []const type = &.{State};
132-
var state_machine_names: []const []const u8 = &.{@TypeOf(State.info).Name};
132+
var state_machine_names: []const []const u8 = &.{@TypeOf(State.info).ProtocolName};
133133
var states_stack: []const type = &.{State};
134134
var states_set: TypeSet(128) = .init;
135135
const ExpectedContext = @TypeOf(State.info).context;
@@ -247,7 +247,7 @@ fn reachableStatesDepthFirstSearch(
247247
}
248248

249249
states.* = states.* ++ &[_]type{NextState};
250-
state_machine_names.* = state_machine_names.* ++ &[_][]const u8{@TypeOf(NextState.info).Name};
250+
state_machine_names.* = state_machine_names.* ++ &[_][]const u8{@TypeOf(NextState.info).ProtocolName};
251251
states_stack.* = states_stack.* ++ &[_]type{NextState};
252252
states_set.insert(NextState);
253253

0 commit comments

Comments
 (0)