Ryan Liptak 6aa3570cb0 windows: Make readLinkW APIs output WTF-16, reduce stack usage of callers
- Affects the following functions:
  + `std.fs.Dir.readLinkW`
  + `std.os.windows.ReadLink`
  + `std.os.windows.ntToWin32Namespace`
  + `std.posix.readlinkW`
  + `std.posix.readlinkatW`

Each of these functions (except `ntToWin32Namespace`) took WTF-16 as input and would output WTF-8, which makes optimal buffer re-use difficult at callsites and could force unnecessary WTF-16 <-> WTF-8 conversion during an intermediate step.

The functions have been updated to output WTF-16, and also allow for the path and the output to re-use the same buffer (i.e. in-place modification), which can reduce the stack usage at callsites. For example, all of `std.fs.Dir.readLink`/`readLinkZ`/`std.posix.readlink`/`readlinkZ`/`readlinkat`/`readlinkatZ` have had their stack usage reduced by one PathSpace struct (64 KiB) when targeting Windows.

The new `ntToWin32Namespace` takes an output buffer and returns a slice from that instead of returning a PathSpace, which is necessary to make the above possible.
2025-11-15 18:16:03 -08:00
..
2025-10-27 07:35:38 -07:00
2025-07-07 22:43:51 -07:00
2025-09-18 22:39:33 -07:00
2025-09-18 22:39:33 -07:00
2025-09-30 13:44:54 +01:00
2025-09-18 22:39:33 -07:00
2025-10-10 22:47:47 -07:00
2025-09-20 14:34:18 -07:00
2024-08-22 08:44:08 +02:00
2025-07-31 22:10:11 -07:00
2025-10-27 07:35:38 -07:00
2025-08-29 17:14:26 -07:00
2025-08-29 17:14:26 -07:00
2025-09-30 13:44:51 +01:00
2025-08-29 17:14:26 -07:00
2025-11-10 09:40:44 +01:00
2025-11-10 09:40:44 +01:00
2025-10-29 06:20:50 -07:00
2025-11-12 22:39:04 +01:00
2025-10-29 06:20:49 -07:00
2025-08-28 18:30:57 -07:00
2025-07-16 10:27:39 -07:00
2025-08-29 17:14:26 -07:00