mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 04:24:33 +01:00
Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db960767d | ||
|
|
43ced7d147 | ||
|
|
8af682b13a | ||
|
|
c3aa650646 | ||
|
|
6cdbf4223c | ||
|
|
f54f061fb3 |
9 changed files with 21 additions and 18 deletions
1
.github/workflows/ci.yaml
vendored
1
.github/workflows/ci.yaml
vendored
|
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- master
|
||||
- 0.15.x
|
||||
concurrency:
|
||||
# Cancels pending runs when a PR gets updated.
|
||||
group: ${{ github.head_ref || github.run_id }}-${{ github.actor }}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ project(zig
|
|||
|
||||
set(ZIG_VERSION_MAJOR 0)
|
||||
set(ZIG_VERSION_MINOR 15)
|
||||
set(ZIG_VERSION_PATCH 0)
|
||||
set(ZIG_VERSION_PATCH 1)
|
||||
set(ZIG_VERSION "" CACHE STRING "Override Zig version string. Default is to find out with git.")
|
||||
|
||||
if("${ZIG_VERSION}" STREQUAL "")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const assert = std.debug.assert;
|
|||
const DevEnv = @import("src/dev.zig").Env;
|
||||
const ValueInterpretMode = enum { direct, by_name };
|
||||
|
||||
const zig_version: std.SemanticVersion = .{ .major = 0, .minor = 15, .patch = 0 };
|
||||
const zig_version: std.SemanticVersion = .{ .major = 0, .minor = 15, .patch = 1 };
|
||||
const stack_size = 46 * 1024 * 1024;
|
||||
|
||||
pub fn build(b: *std.Build) !void {
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@
|
|||
<a href="https://ziglang.org/documentation/0.12.0/">0.12.0</a> |
|
||||
<a href="https://ziglang.org/documentation/0.13.0/">0.13.0</a> |
|
||||
<a href="https://ziglang.org/documentation/0.14.1/">0.14.1</a> |
|
||||
<a href="https://ziglang.org/documentation/0.15.0/">0.15.0</a> |
|
||||
<a href="https://ziglang.org/documentation/0.15.1/">0.15.1</a> |
|
||||
master
|
||||
</nav>
|
||||
<nav aria-labelledby="table-of-contents">
|
||||
|
|
|
|||
|
|
@ -836,7 +836,6 @@ pub fn peekDelimiterExclusive(r: *Reader, delimiter: u8) DelimiterError![]u8 {
|
|||
error.EndOfStream => {
|
||||
const remaining = r.buffer[r.seek..r.end];
|
||||
if (remaining.len == 0) return error.EndOfStream;
|
||||
r.toss(remaining.len);
|
||||
return remaining;
|
||||
},
|
||||
else => |e| return e,
|
||||
|
|
@ -1364,6 +1363,7 @@ test peekDelimiterExclusive {
|
|||
try testing.expectEqualStrings("ab", try r.peekDelimiterExclusive('\n'));
|
||||
r.toss(3);
|
||||
try testing.expectEqualStrings("c", try r.peekDelimiterExclusive('\n'));
|
||||
try testing.expectEqualStrings("c", try r.peekDelimiterExclusive('\n'));
|
||||
}
|
||||
|
||||
test streamDelimiter {
|
||||
|
|
|
|||
|
|
@ -1090,7 +1090,7 @@ pub fn printValue(
|
|||
else => invalidFmtError(fmt, value),
|
||||
},
|
||||
'X' => switch (@typeInfo(T)) {
|
||||
.float, .comptime_float => return printFloatHexOptions(w, value, options.toNumber(.hex, .lower)),
|
||||
.float, .comptime_float => return printFloatHexOptions(w, value, options.toNumber(.hex, .upper)),
|
||||
.int, .comptime_int => return printInt(w, value, 16, .upper, options),
|
||||
.@"enum" => return printInt(w, @intFromEnum(value), 16, .upper, options),
|
||||
.@"struct" => return value.formatNumber(w, options.toNumber(.hex, .upper)),
|
||||
|
|
|
|||
|
|
@ -11064,6 +11064,7 @@ pub const kinfo_getfile = freebsd.kinfo_getfile;
|
|||
|
||||
pub const COPYFILE = darwin.COPYFILE;
|
||||
pub const CPUFAMILY = darwin.CPUFAMILY;
|
||||
pub const PT = darwin.PT;
|
||||
pub const DB_RECORDTYPE = darwin.DB_RECORDTYPE;
|
||||
pub const EXC = darwin.EXC;
|
||||
pub const EXCEPTION = darwin.EXCEPTION;
|
||||
|
|
|
|||
|
|
@ -1343,14 +1343,15 @@ pub const Reader = struct {
|
|||
if (is_windows) {
|
||||
// Unfortunately, `ReadFileScatter` cannot be used since it
|
||||
// requires page alignment.
|
||||
assert(io_reader.seek == io_reader.end);
|
||||
io_reader.seek = 0;
|
||||
io_reader.end = 0;
|
||||
if (io_reader.seek == io_reader.end) {
|
||||
io_reader.seek = 0;
|
||||
io_reader.end = 0;
|
||||
}
|
||||
const first = data[0];
|
||||
if (first.len >= io_reader.buffer.len) {
|
||||
if (first.len >= io_reader.buffer.len - io_reader.end) {
|
||||
return readPositional(r, first);
|
||||
} else {
|
||||
io_reader.end += try readPositional(r, io_reader.buffer);
|
||||
io_reader.end += try readPositional(r, io_reader.buffer[io_reader.end..]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -1391,14 +1392,15 @@ pub const Reader = struct {
|
|||
if (is_windows) {
|
||||
// Unfortunately, `ReadFileScatter` cannot be used since it
|
||||
// requires page alignment.
|
||||
assert(io_reader.seek == io_reader.end);
|
||||
io_reader.seek = 0;
|
||||
io_reader.end = 0;
|
||||
if (io_reader.seek == io_reader.end) {
|
||||
io_reader.seek = 0;
|
||||
io_reader.end = 0;
|
||||
}
|
||||
const first = data[0];
|
||||
if (first.len >= io_reader.buffer.len) {
|
||||
return readStreaming(r, first);
|
||||
if (first.len >= io_reader.buffer.len - io_reader.end) {
|
||||
return readPositional(r, first);
|
||||
} else {
|
||||
io_reader.end += try readStreaming(r, io_reader.buffer);
|
||||
io_reader.end += try readPositional(r, io_reader.buffer[io_reader.end..]);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1992,8 +1992,7 @@ pub const Stream = struct {
|
|||
};
|
||||
if (n == 0) return error.EndOfStream;
|
||||
if (n > data_size) {
|
||||
io_r.seek = 0;
|
||||
io_r.end = n - data_size;
|
||||
io_r.end += n - data_size;
|
||||
return data_size;
|
||||
}
|
||||
return n;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue