Reading some examples in the standard library it seems that the myPick function can also accept a correctly typed pointer and that c_void will be compatible even without cast.
myPick
c_void
Example: github.com/ziglang/zig/blob/master...
Good point. It looks like you can do the pointer cast in the interface: github.com/ziglang/zig/blob/master...
I'll have to look at that and maybe write a followup about it. Thanks!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
Take off every Zig!
Reading some examples in the standard library it seems that the
myPick
function can also accept a correctly typed pointer and thatc_void
will be compatible even without cast.Example:
github.com/ziglang/zig/blob/master...
Good point. It looks like you can do the pointer cast in the interface:
github.com/ziglang/zig/blob/master...
I'll have to look at that and maybe write a followup about it. Thanks!