mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-21 16:41:56 +03:00
9f9f215305
zig fmt now replaces c_void with anyopaque to make updating code easy.
15 lines
164 B
Zig
15 lines
164 B
Zig
const Foo = struct {
|
|
y: u8,
|
|
};
|
|
|
|
var foo: Foo = undefined;
|
|
const t = &foo;
|
|
|
|
fn bar(pointer: ?*anyopaque) void {
|
|
_ = pointer;
|
|
}
|
|
|
|
test "fixed" {
|
|
bar(t);
|
|
}
|