Skip to content

Instantly share code, notes, and snippets.

@SpaceManiac
Created February 11, 2011 03:09
Show Gist options
  • Save SpaceManiac/821859 to your computer and use it in GitHub Desktop.
Save SpaceManiac/821859 to your computer and use it in GitHub Desktop.
def ICArray(name, *args):
struct = Struct(name + "_data", *args)
array = MetaArray(lambda ctx: ctx[name + "_len"], struct)
return Struct(name, UBInt16(name + "_len"), array, struct)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment