mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-12-22 14:03:10 -05:00
Update c_void to anyopaque to fix #84
This commit is contained in:
parent
86e017eb32
commit
515a5188f4
2 changed files with 7 additions and 6 deletions
|
@ -41,7 +41,7 @@ Verify the installation and build number of `zig` like so:
|
|||
|
||||
```bash
|
||||
$ zig version
|
||||
0.9.0-dev.1343+xxxxxxxxx
|
||||
0.9.0-dev.2025+xxxxxxxxx
|
||||
```
|
||||
|
||||
Clone this repository with Git:
|
||||
|
@ -61,7 +61,7 @@ $ zig build
|
|||
|
||||
The Zig language is under very active development. In order to be current,
|
||||
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
|
||||
as high as that shown in the example version check above.
|
||||
|
||||
|
@ -77,6 +77,7 @@ about input:
|
|||
|
||||
### 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-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
|
||||
|
|
|
@ -8,7 +8,7 @@ const print = std.debug.print;
|
|||
// When changing this version, be sure to also update README.md in two places:
|
||||
// 1) Getting Started
|
||||
// 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 {
|
||||
/// 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 ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004;
|
||||
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);
|
||||
var mode: w32.DWORD = 0;
|
||||
|
|
Loading…
Reference in a new issue