Useful to correctly determine the byte size of the external memory that
needs to be allocated for an external array.
// return size of external array type, or 0 if unrecognized
-static inline size_t ExternalArraySize(enum ExternalArrayType type) {
+size_t ExternalArraySize(enum ExternalArrayType type) {
switch (type) {
case v8::kExternalUnsignedByteArray:
return sizeof(uint8_t);
NODE_EXTERN typedef void (*FreeCallback)(char* data, void* hint);
/**
+ * Return byte size of external array type.
+ */
+NODE_EXTERN size_t ExternalArraySize(enum v8::ExternalArrayType type);
+
+/**
* Allocate external memory and set to passed object. If data is passed then
* will use that instead of allocating new.
*