string literals are now null terminated
this also deletes C string literals from the language, and then makes the std lib changes and compiler changes necessary to get the behavior tests and std lib tests passing again.
This commit is contained in:
@@ -353,7 +353,7 @@ pub const Thread = struct {
|
||||
}
|
||||
var count: c_int = undefined;
|
||||
var count_len: usize = @sizeOf(c_int);
|
||||
const name = if (comptime std.Target.current.isDarwin()) c"hw.logicalcpu" else c"hw.ncpu";
|
||||
const name = if (comptime std.Target.current.isDarwin()) "hw.logicalcpu" else "hw.ncpu";
|
||||
os.sysctlbynameC(name, &count, &count_len, null, 0) catch |err| switch (err) {
|
||||
error.NameTooLong => unreachable,
|
||||
else => |e| return e,
|
||||
|
||||
Reference in New Issue
Block a user