Skip to content

Instantly share code, notes, and snippets.

@fengb
Last active May 30, 2019 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fengb/d346fa0f883547260ce0e4e48f158bbe to your computer and use it in GitHub Desktop.
Save fengb/d346fa0f883547260ce0e4e48f158bbe to your computer and use it in GitHub Desktop.
// Frame definition:
// 4 bytes = next ptr
// 4 bytes = data length
// n bytes = data
const Frame = @OpaqueType();
const Node = packed struct {
next: *?*Frame,
data_len: *usize,
data: [*]u8,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment