aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorStephen Gregoratto <dev@sgregoratto.me>2024-04-13 15:28:12 +1000
committerStephen Gregoratto <dev@sgregoratto.me>2024-07-17 23:11:23 +1000
commit3095e83d1162081ba54ed73c59810bfe0fb3f025 (patch)
treeefd632f73b81439d7197c51b4a1f01eacb934a67 /lib/std/debug.zig
parent1735455099cb75acb970f549e579368e2a447405 (diff)
downloadzig-3095e83d1162081ba54ed73c59810bfe0fb3f025.tar.gz
zig-3095e83d1162081ba54ed73c59810bfe0fb3f025.zip
Windows: Rework kernel32 apis
To facilitate #1840, this commit slims `std.windows.kernel32` to only have the functions needed by the standard library. Since this will break projects that relied on these, I offer two solutions: - Make an argument as to why certain functions should be added back in. Note that they may just be wrappers around `ntdll` APIs, which would go against #1840. If necessary I'll add them back in *and* make wrappers in `std.windows` for it. - Maintain your own list of APIs. This is the option taken by bun[1], where they wrap functions with tracing. - Use `zigwin32`. I've also added TODO comments that specify which functions can be reimplemented using `ntdll` APIs in the future. Other changes: - Group functions into groups (I/O, process management etc.). - Synchronize definitions against Microsoft documentation to use the proper parameter types/names. - Break all functions with parameters over multiple lines.
Diffstat (limited to 'lib/std/debug.zig')
-rw-r--r--lib/std/debug.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig
index b2bc82029d..568b49f2f6 100644
--- a/lib/std/debug.zig
+++ b/lib/std/debug.zig
@@ -1987,7 +1987,7 @@ pub const DebugInfo = struct {
@memcpy(name_buffer[0..4], &[_]u16{ '\\', '?', '?', '\\' });
const process_handle = windows.kernel32.GetCurrentProcess();
- const len = windows.kernel32.K32GetModuleFileNameExW(
+ const len = windows.kernel32.GetModuleFileNameExW(
process_handle,
module.handle,
@ptrCast(&name_buffer[4]),