Skip to content

Instantly share code, notes, and snippets.

@fredreichbier
Created September 1, 2010 16:42
Show Gist options
  • Select an option

  • Save fredreichbier/560978 to your computer and use it in GitHub Desktop.

Select an option

Save fredreichbier/560978 to your computer and use it in GitHub Desktop.
Every sdk implements:
VarArgs: cover from Pointer {
// public api for retrieving varargs
getValue: func <T> (index: Int, T: Class) -> T
getClass: func (index: Int) -> T
count: SizeT {
get { ... }
}
// private api used by C code
new: static func (count: SizeT) -> This
_setValue: func <T> (index: Int, value: T)
}
In our standard SDK, this would wrap a Bag.
In custom sdk, it would ... well, you're free to do whatever you want.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment