Skip to content

Commit f703418

Browse files
usebeforefreextexx
authored andcommitted
(cherry picked from commit 62e3d46) Change-Id: Icd280121bc943362ff2dbb01d223db2fde5d01f5
1 parent 15f8b58 commit f703418

File tree

10 files changed

+113
-113
lines changed

10 files changed

+113
-113
lines changed

lib/std/Thread.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ pub const GetNameError = error{
250250
Unexpected,
251251
} || posix.PrctlError || posix.ReadError || std.fs.File.OpenError || std.fmt.BufPrintError;
252252

253-
/// On Windows, the result is encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
253+
/// On Windows, the result is encoded as [WTF-8](https://wtf-8.codeberg.page/).
254254
/// On other platforms, the result is an opaque sequence of bytes with no particular encoding.
255255
pub fn getName(self: Thread, buffer_ptr: *[max_name_len:0]u8) GetNameError!?[]const u8 {
256256
buffer_ptr[max_name_len] = 0;

lib/std/fs.zig

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirE
4545
/// The byte count includes room for a null sentinel byte.
4646
///
4747
/// * On Windows, `[]u8` file paths are encoded as
48-
/// [WTF-8](https://simonsapin.github.io/wtf-8/).
48+
/// [WTF-8](https://wtf-8.codeberg.page/).
4949
/// * On WASI, `[]u8` file paths are encoded as valid UTF-8.
5050
/// * On other platforms, `[]u8` file paths are opaque sequences of bytes with
5151
/// no particular encoding.
@@ -67,7 +67,7 @@ pub const max_path_bytes = switch (native_os) {
6767
/// operations are likely to fit into a `u8` array of this length, but
6868
/// (depending on the platform) this assumption may not hold for every configuration.
6969
/// The byte count does not include a null sentinel byte.
70-
/// On Windows, `[]u8` file name components are encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
70+
/// On Windows, `[]u8` file name components are encoded as [WTF-8](https://wtf-8.codeberg.page/).
7171
/// On WASI, file name components are encoded as valid UTF-8.
7272
/// On other platforms, `[]u8` components are an opaque sequence of bytes with no particular encoding.
7373
pub const max_name_bytes = switch (native_os) {
@@ -99,7 +99,7 @@ pub const base64_decoder = base64.Base64Decoder.init(base64_alphabet, null);
9999
/// Same as `Dir.updateFile`, except asserts that both `source_path` and `dest_path`
100100
/// are absolute. See `Dir.updateFile` for a function that operates on both
101101
/// absolute and relative paths.
102-
/// On Windows, both paths should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
102+
/// On Windows, both paths should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
103103
/// On WASI, both paths should be encoded as valid UTF-8.
104104
/// On other platforms, both paths are an opaque sequence of bytes with no particular encoding.
105105
pub fn updateFileAbsolute(
@@ -116,7 +116,7 @@ pub fn updateFileAbsolute(
116116
/// Same as `Dir.copyFile`, except asserts that both `source_path` and `dest_path`
117117
/// are absolute. See `Dir.copyFile` for a function that operates on both
118118
/// absolute and relative paths.
119-
/// On Windows, both paths should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
119+
/// On Windows, both paths should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
120120
/// On WASI, both paths should be encoded as valid UTF-8.
121121
/// On other platforms, both paths are an opaque sequence of bytes with no particular encoding.
122122
pub fn copyFileAbsolute(
@@ -133,7 +133,7 @@ pub fn copyFileAbsolute(
133133
/// Create a new directory, based on an absolute path.
134134
/// Asserts that the path is absolute. See `Dir.makeDir` for a function that operates
135135
/// on both absolute and relative paths.
136-
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
136+
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
137137
/// On WASI, `absolute_path` should be encoded as valid UTF-8.
138138
/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
139139
pub fn makeDirAbsolute(absolute_path: []const u8) !void {
@@ -154,7 +154,7 @@ pub fn makeDirAbsoluteW(absolute_path_w: [*:0]const u16) !void {
154154
}
155155

156156
/// Same as `Dir.deleteDir` except the path is absolute.
157-
/// On Windows, `dir_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
157+
/// On Windows, `dir_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
158158
/// On WASI, `dir_path` should be encoded as valid UTF-8.
159159
/// On other platforms, `dir_path` is an opaque sequence of bytes with no particular encoding.
160160
pub fn deleteDirAbsolute(dir_path: []const u8) !void {
@@ -175,7 +175,7 @@ pub fn deleteDirAbsoluteW(dir_path: [*:0]const u16) !void {
175175
}
176176

177177
/// Same as `Dir.rename` except the paths are absolute.
178-
/// On Windows, both paths should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
178+
/// On Windows, both paths should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
179179
/// On WASI, both paths should be encoded as valid UTF-8.
180180
/// On other platforms, both paths are an opaque sequence of bytes with no particular encoding.
181181
pub fn renameAbsolute(old_path: []const u8, new_path: []const u8) !void {
@@ -237,7 +237,7 @@ pub fn defaultWasiCwd() std.os.wasi.fd_t {
237237
/// See `openDirAbsoluteZ` for a function that accepts a null-terminated path.
238238
///
239239
/// Asserts that the path parameter has no null bytes.
240-
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
240+
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
241241
/// On WASI, `absolute_path` should be encoded as valid UTF-8.
242242
/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
243243
pub fn openDirAbsolute(absolute_path: []const u8, flags: Dir.OpenOptions) File.OpenError!Dir {
@@ -262,7 +262,7 @@ pub fn openDirAbsoluteW(absolute_path_c: [*:0]const u16, flags: Dir.OpenOptions)
262262
/// operates on both absolute and relative paths.
263263
/// Asserts that the path parameter has no null bytes. See `openFileAbsoluteZ` for a function
264264
/// that accepts a null-terminated path.
265-
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
265+
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
266266
/// On WASI, `absolute_path` should be encoded as valid UTF-8.
267267
/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
268268
pub fn openFileAbsolute(absolute_path: []const u8, flags: File.OpenFlags) File.OpenError!File {
@@ -287,7 +287,7 @@ pub fn openFileAbsoluteW(absolute_path_w: []const u16, flags: File.OpenFlags) Fi
287287
/// For example, instead of testing if a file exists and then opening it, just
288288
/// open it and handle the error for file not found.
289289
/// See `accessAbsoluteZ` for a function that accepts a null-terminated path.
290-
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
290+
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
291291
/// On WASI, `absolute_path` should be encoded as valid UTF-8.
292292
/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
293293
pub fn accessAbsolute(absolute_path: []const u8, flags: File.OpenFlags) Dir.AccessError!void {
@@ -311,7 +311,7 @@ pub fn accessAbsoluteW(absolute_path: [*:0]const u16, flags: File.OpenFlags) Dir
311311
/// operates on both absolute and relative paths.
312312
/// Asserts that the path parameter has no null bytes. See `createFileAbsoluteC` for a function
313313
/// that accepts a null-terminated path.
314-
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
314+
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
315315
/// On WASI, `absolute_path` should be encoded as valid UTF-8.
316316
/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
317317
pub fn createFileAbsolute(absolute_path: []const u8, flags: File.CreateFlags) File.OpenError!File {
@@ -335,7 +335,7 @@ pub fn createFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.CreateFl
335335
/// Asserts that the path is absolute. See `Dir.deleteFile` for a function that
336336
/// operates on both absolute and relative paths.
337337
/// Asserts that the path parameter has no null bytes.
338-
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
338+
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
339339
/// On WASI, `absolute_path` should be encoded as valid UTF-8.
340340
/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
341341
pub fn deleteFileAbsolute(absolute_path: []const u8) Dir.DeleteFileError!void {
@@ -360,7 +360,7 @@ pub fn deleteFileAbsoluteW(absolute_path_w: [*:0]const u16) Dir.DeleteFileError!
360360
/// Asserts that the path is absolute. See `Dir.deleteTree` for a function that
361361
/// operates on both absolute and relative paths.
362362
/// Asserts that the path parameter has no null bytes.
363-
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
363+
/// On Windows, `absolute_path` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
364364
/// On WASI, `absolute_path` should be encoded as valid UTF-8.
365365
/// On other platforms, `absolute_path` is an opaque sequence of bytes with no particular encoding.
366366
pub fn deleteTreeAbsolute(absolute_path: []const u8) !void {
@@ -378,7 +378,7 @@ pub fn deleteTreeAbsolute(absolute_path: []const u8) !void {
378378
}
379379

380380
/// Same as `Dir.readLink`, except it asserts the path is absolute.
381-
/// On Windows, `pathname` should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
381+
/// On Windows, `pathname` should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
382382
/// On WASI, `pathname` should be encoded as valid UTF-8.
383383
/// On other platforms, `pathname` is an opaque sequence of bytes with no particular encoding.
384384
pub fn readLinkAbsolute(pathname: []const u8, buffer: *[max_path_bytes]u8) ![]u8 {
@@ -404,7 +404,7 @@ pub fn readLinkAbsoluteZ(pathname_c: [*:0]const u8, buffer: *[max_path_bytes]u8)
404404
/// one; the latter case is known as a dangling link.
405405
/// If `sym_link_path` exists, it will not be overwritten.
406406
/// See also `symLinkAbsoluteZ` and `symLinkAbsoluteW`.
407-
/// On Windows, both paths should be encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
407+
/// On Windows, both paths should be encoded as [WTF-8](https://wtf-8.codeberg.page/).
408408
/// On WASI, both paths should be encoded as valid UTF-8.
409409
/// On other platforms, both paths are an opaque sequence of bytes with no particular encoding.
410410
pub fn symLinkAbsolute(
@@ -536,7 +536,7 @@ pub fn selfExePathAlloc(allocator: Allocator) ![]u8 {
536536
/// This function may return an error if the current executable
537537
/// was deleted after spawning.
538538
/// Returned value is a slice of out_buffer.
539-
/// On Windows, the result is encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
539+
/// On Windows, the result is encoded as [WTF-8](https://wtf-8.codeberg.page/).
540540
/// On other platforms, the result is an opaque sequence of bytes with no particular encoding.
541541
///
542542
/// On Linux, depends on procfs being mounted. If the currently executing binary has
@@ -667,7 +667,7 @@ pub fn selfExeDirPathAlloc(allocator: Allocator) ![]u8 {
667667

668668
/// Get the directory path that contains the current executable.
669669
/// Returned value is a slice of out_buffer.
670-
/// On Windows, the result is encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
670+
/// On Windows, the result is encoded as [WTF-8](https://wtf-8.codeberg.page/).
671671
/// On other platforms, the result is an opaque sequence of bytes with no particular encoding.
672672
pub fn selfExeDirPath(out_buffer: []u8) SelfExePathError![]const u8 {
673673
const self_exe_path = try selfExePath(out_buffer);
@@ -677,7 +677,7 @@ pub fn selfExeDirPath(out_buffer: []u8) SelfExePathError![]const u8 {
677677
}
678678

679679
/// `realpath`, except caller must free the returned memory.
680-
/// On Windows, the result is encoded as [WTF-8](https://simonsapin.github.io/wtf-8/).
680+
/// On Windows, the result is encoded as [WTF-8](https://wtf-8.codeberg.page/).
681681
/// On other platforms, the result is an opaque sequence of bytes with no particular encoding.
682682
/// See also `Dir.realpath`.
683683
pub fn realpathAlloc(allocator: Allocator, pathname: []const u8) ![]u8 {

0 commit comments

Comments
 (0)