From b1191cbeb50b1e57edc93d6e4006b8bb0346f0d7 Mon Sep 17 00:00:00 2001 From: BratishkaErik <25210740+BratishkaErik@users.noreply.github.com> Date: Thu, 15 Dec 2022 07:20:11 +0600 Subject: [PATCH] {mach,gpu}: more undef/nul -> undefined/null renames (#638) Signed-off-by: Eric Joldasov --- libs/gpu/README.md | 2 -- src/platform/util.zig | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/gpu/README.md b/libs/gpu/README.md index e3b527cf..aa0ad2c8 100644 --- a/libs/gpu/README.md +++ b/libs/gpu/README.md @@ -215,8 +215,6 @@ The rules for translating `webgpu.h` are as follows: * As a result, a `null`able `Buffer` is represented simply as `?*Buffer`, and any function that would normally take `WGPUBuffer` now takes `*Buffer` as a parameter. * `WGPUBufferBindingType` -> `gpu.Buffer.BindingType` (purely because it's prefix matches an opaque pointer type, it thus goes into the `Buffer` opaque type.) * Reserved Zig keywords are translated as follows: - * `undefined` -> `undef` - * `null` -> `nul` * `error` -> `err` * `type` -> `typ` * `opaque` -> `opaq` diff --git a/src/platform/util.zig b/src/platform/util.zig index 0c3922c2..3bad08e2 100644 --- a/src/platform/util.zig +++ b/src/platform/util.zig @@ -26,7 +26,7 @@ pub fn detectBackendType(allocator: std.mem.Allocator) !gpu.BackendType { const MACH_GPU_BACKEND = try getEnvVarOwned(allocator, "MACH_GPU_BACKEND"); if (MACH_GPU_BACKEND) |backend| { defer allocator.free(backend); - if (std.ascii.eqlIgnoreCase(backend, "null")) return .nul; + if (std.ascii.eqlIgnoreCase(backend, "null")) return .null; if (std.ascii.eqlIgnoreCase(backend, "d3d11")) return .d3d11; if (std.ascii.eqlIgnoreCase(backend, "d3d12")) return .d3d12; if (std.ascii.eqlIgnoreCase(backend, "metal")) return .metal;