Просмотр исходного кода

Update c_void to anyopaque to fix #84

Dave Gauer 3 лет назад
Родитель
Сommit
515a5188f4
2 измененных файлов с 7 добавлено и 6 удалено
  1. 3 2
      README.md
  2. 4 4
      build.zig

+ 3 - 2
README.md

@@ -41,7 +41,7 @@ Verify the installation and build number of `zig` like so:
 
 
 ```bash
 ```bash
 $ zig version
 $ zig version
-0.9.0-dev.1343+xxxxxxxxx
+0.9.0-dev.2025+xxxxxxxxx
 ```
 ```
 
 
 Clone this repository with Git:
 Clone this repository with Git:
@@ -61,7 +61,7 @@ $ zig build
 
 
 The Zig language is under very active development. In order to be current,
 The Zig language is under very active development. In order to be current,
 Ziglings tracks **development** builds of the Zig compiler rather than
 Ziglings tracks **development** builds of the Zig compiler rather than
-versioned **release** builds. The last stable release was `0.7.1`, but Ziglings
+versioned **release** builds. The last stable release was `0.8.1`, but Ziglings
 needs a dev build with pre-release version "0.9.0" and a build number at least
 needs a dev build with pre-release version "0.9.0" and a build number at least
 as high as that shown in the example version check above.
 as high as that shown in the example version check above.
 
 
@@ -77,6 +77,7 @@ about input:
 
 
 ### Version Changes
 ### Version Changes
 
 
+* 2021-12-20 0.9.0-dev.2025 - `c_void` is now `anyopaque`
 * 2021-06-14 0.9.0-dev.137  - std.build.Id `.Custom` is now `.custom`
 * 2021-06-14 0.9.0-dev.137  - std.build.Id `.Custom` is now `.custom`
 * 2021-04-21 0.8.0-dev.1983 - std.fmt.format() `any` format string required
 * 2021-04-21 0.8.0-dev.1983 - std.fmt.format() `any` format string required
 * 2021-02-12 0.8.0-dev.1065 - std.fmt.format() `s` (string) format string required
 * 2021-02-12 0.8.0-dev.1065 - std.fmt.format() `s` (string) format string required

+ 4 - 4
build.zig

@@ -8,7 +8,7 @@ const print = std.debug.print;
 // When changing this version, be sure to also update README.md in two places:
 // When changing this version, be sure to also update README.md in two places:
 //     1) Getting Started
 //     1) Getting Started
 //     2) Version Changes
 //     2) Version Changes
-const needed_version = std.SemanticVersion.parse("0.9.0-dev.1343") catch unreachable;
+const needed_version = std.SemanticVersion.parse("0.9.0-dev.2025") catch unreachable;
 
 
 const Exercise = struct {
 const Exercise = struct {
     /// main_file must have the format key_name.zig.
     /// main_file must have the format key_name.zig.
@@ -501,9 +501,9 @@ pub fn build(b: *Builder) void {
                     const DWORD = std.os.windows.DWORD;
                     const DWORD = std.os.windows.DWORD;
                     const ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004;
                     const ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004;
                     const STD_ERROR_HANDLE = @bitCast(DWORD, @as(i32, -12));
                     const STD_ERROR_HANDLE = @bitCast(DWORD, @as(i32, -12));
-                    extern "kernel32" fn GetStdHandle(id: DWORD) callconv(WINAPI) ?*c_void;
-                    extern "kernel32" fn GetConsoleMode(console: ?*c_void, out_mode: *DWORD) callconv(WINAPI) u32;
-                    extern "kernel32" fn SetConsoleMode(console: ?*c_void, mode: DWORD) callconv(WINAPI) u32;
+                    extern "kernel32" fn GetStdHandle(id: DWORD) callconv(WINAPI) ?*anyopaque;
+                    extern "kernel32" fn GetConsoleMode(console: ?*anyopaque, out_mode: *DWORD) callconv(WINAPI) u32;
+                    extern "kernel32" fn SetConsoleMode(console: ?*anyopaque, mode: DWORD) callconv(WINAPI) u32;
                 };
                 };
                 const handle = w32.GetStdHandle(w32.STD_ERROR_HANDLE);
                 const handle = w32.GetStdHandle(w32.STD_ERROR_HANDLE);
                 var mode: w32.DWORD = 0;
                 var mode: w32.DWORD = 0;