Skip to content

Instantly share code, notes, and snippets.

@crazy2be
Created July 2, 2011 20:30
Show Gist options
  • Save crazy2be/1061617 to your computer and use it in GitHub Desktop.
Save crazy2be/1061617 to your computer and use it in GitHub Desktop.
func (ctx *Context) newGoValueArray(ptr unsafe.Pointer, size uint) ([]*Value) {
goarr := make([]*Value, size)
for i := uint(0); i < size; i++ {
goarr[i] = ctx.newValue(C.JSValueRef(ptr))
ptr = unsafe.Pointer(4+uintptr(ptr))
}
return goarr
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment