Skip to content

Commit 81e8b6f

Browse files
committed
Make CoStatus names more readable
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
1 parent dd4f2da commit 81e8b6f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/State.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ pub const Status = enum(c_int) {
5151
};
5252

5353
pub const CoStatus = enum(c_int) {
54-
run = c.LUA_CORUN,
55-
sus = c.LUA_COSUS,
56-
nor = c.LUA_CONOR,
57-
fin = c.LUA_COFIN,
54+
running = c.LUA_CORUN,
55+
suspended = c.LUA_COSUS,
56+
normal = c.LUA_CONOR,
57+
done = c.LUA_COFIN,
5858
err = c.LUA_COERR,
5959
};
6060

src/tests.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ test "thread API methods" {
12081208
const thread = lua.createThread();
12091209

12101210
// Test thread status and state methods
1211-
try expectEq(thread.status(), .fin); // Empty threads are finished
1211+
try expectEq(thread.status(), .done); // Empty threads are done
12121212
try expect(thread.isReset()); // Threads start reset
12131213
try expect(thread.isYieldable()); // Threads are yieldable
12141214

@@ -2147,7 +2147,7 @@ test "coroutine debug break" {
21472147
try expectEq(err, error.Break);
21482148
};
21492149

2150-
try expectEq(thread.status(), .nor);
2150+
try expectEq(thread.status(), .normal);
21512151

21522152
// Call function again - should complete and return result
21532153
const result = try func.?.call(.{}, i32);

0 commit comments

Comments
 (0)