Skip to content

Instantly share code, notes, and snippets.

@gerdr
Last active December 22, 2015 15:49
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 gerdr/0d176de4732660a7b2fd to your computer and use it in GitHub Desktop.
Save gerdr/0d176de4732660a7b2fd to your computer and use it in GitHub Desktop.

reprs:

  • VoidPointer
  • TypedPointer, stores target type in REPR
  • CheckedPointer, stores target type in REPR and bounds in body

types:

  • OpaquePointer backed by VoidPointer
  • TransparentPointer backed by TypedPointer, pass-through method calls
  • MovablePointer backed by CheckedPointer, allows pointer arithmetics and explicit deref()
  • UnsafePointer backed by VoidPointer, allows byte-wise pointer arithmetics and explicit cast() to other pointer types
@gerdr
Copy link
Author

gerdr commented Sep 9, 2013

according to arnsholt, we probably don't need TypedPointer - just set the REPR data to the type object and leave it NULL for opaque pointers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment