diff options
-rw-r--r-- | src/smalloc.cc | 2 | ||||
-rw-r--r-- | src/smalloc.h | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/smalloc.cc b/src/smalloc.cc index 8100fbf81..d97194b85 100644 --- a/src/smalloc.cc +++ b/src/smalloc.cc @@ -69,7 +69,7 @@ static bool using_alloc_cb; // 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); diff --git a/src/smalloc.h b/src/smalloc.h index d1b04eb89..029f0d9e5 100644 --- a/src/smalloc.h +++ b/src/smalloc.h @@ -42,6 +42,11 @@ static const unsigned int kMaxLength = 0x3fffffff; 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. * |