fix: build with 0.14.0-dev.3039

This commit is contained in:
CJ van den Berg 2025-02-04 22:52:28 +01:00
parent 72aa6150c5
commit 063c441c30
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 9 additions and 9 deletions

View file

@ -145,9 +145,9 @@ const Proc = struct {
fn receive(self: *Proc, _: tp.pid_ref, m: tp.message) tp.result {
errdefer self.deinit();
var bytes: []u8 = "";
var bytes: []const u8 = "";
var err: i64 = 0;
var err_msg: []u8 = "";
var err_msg: []const u8 = "";
if (try m.match(.{ "fd", "stdout", "read_ready" })) {
try self.dispatch_stdout();
if (self.fd_stdout) |fd_stdout| fd_stdout.wait_read() catch |e| return self.handle_error(e);

View file

@ -499,14 +499,14 @@ fn log_last_error(err: anytype) @TypeOf(err) {
fn exitHandlerRun(comptime T: type) c.thespian_exit_handler {
if (T == @TypeOf(null)) return null;
return switch (@typeInfo(T)) {
.Optional => |info| switch (@typeInfo(info.child)) {
.Pointer => |ptr_info| switch (ptr_info.size) {
.One => ptr_info.child.run,
.optional => |info| switch (@typeInfo(info.child)) {
.pointer => |ptr_info| switch (ptr_info.size) {
.one => ptr_info.child.run,
else => @compileError("expected single item pointer, found: '" ++ @typeName(T) ++ "'"),
},
},
.Pointer => |ptr_info| switch (ptr_info.size) {
.One => ptr_info.child.run,
.pointer => |ptr_info| switch (ptr_info.size) {
.one => ptr_info.child.run,
else => @compileError("expected single item pointer, found: '" ++ @typeName(T) ++ "'"),
},
else => @compileError("expected optional pointer or pointer type, found: '" ++ @typeName(T) ++ "'"),
@ -515,8 +515,8 @@ fn exitHandlerRun(comptime T: type) c.thespian_exit_handler {
pub fn receive(r: anytype) void {
const T = switch (@typeInfo(@TypeOf(r))) {
.Pointer => |ptr_info| switch (ptr_info.size) {
.One => ptr_info.child,
.pointer => |ptr_info| switch (ptr_info.size) {
.one => ptr_info.child,
else => @compileError("invalid receiver type"),
},
else => @compileError("invalid receiver type"),