Skip to content

Instantly share code, notes, and snippets.

View rjtobin's full-sized avatar

Josh Tobin rjtobin

View GitHub Profile
@rjtobin
rjtobin / cast.zig
Created September 29, 2019 22:07
zig c pointer question
const c = @cImport({
@cInclude("cfile.h");
});
pub fn main() void {
var x:?[*]const u8 = null;
x = c.some_func(0);
}

Keybase proof

I hereby claim:

  • I am rjtobin on github.
  • I am rjt (https://keybase.io/rjt) on keybase.
  • I have a public key whose fingerprint is 029A 45C0 9550 5C0C C1E3 5F98 186D 8475 4E82 021E

To claim this, I am signing this object: