<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Typed Arrays have no public facing API"
href="https://bugs.webkit.org/show_bug.cgi?id=120112#c34">Comment # 34</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Typed Arrays have no public facing API"
href="https://bugs.webkit.org/show_bug.cgi?id=120112">bug 120112</a>
from <span class="vcard"><a class="email" href="mailto:ggaren@apple.com" title="Geoffrey Garen <ggaren@apple.com>"> <span class="fn">Geoffrey Garen</span></a>
</span></b>
<pre><span class="quote">> Create a TypedArray:
> JSObjectRef JSObjectMakeTypedArray(JSContextRef ctx, JSTypedArrayType
> arrayType, size_t numElements);</span >
I would say "length" instead of numElements. We don't like to abbreviate in API names, and length is the name in JavaScript.
<span class="quote">> Query byte length and element count:
> size_t JSObjectGetTypedArrayByteLength(JSContextRef ctx, JSObjectRef object);
> size_t JSObjectGetTypedArrayNumElements(JSContextRef ctx, JSObjectRef
> object);</span >
Once again, length.
<span class="quote">> Obtain a pointer to the array's data (retains the pointer):
> void * JSObjectGetTypedArrayDataPtr(JSContextRef ctx, JSObjectRef object);
> or
> void * JSObjectGetTypedArrayDataPtr(JSContextRef ctx, JSObjectRef object,
> size_t &byteLength);</span >
We say "Create" or "Copy" when we make something that needs a release. Here I would use "Copy" I guess.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>