I'm interacting with the SDL zig bindings
- I have a
Surface
, which contains a pointer to some pixels. In C, this is avoid*
, in zig it is an*anyopaque
- I want to pass this pointer-to-pixels to the
UpdateTexture
function, which in C accepts avoid*
and in zig accepts a[]const u8
@ptrCast
gives me "illegal pointer cast to slice", so what is the correct way to treat an opaque pointer as a slice?