diff options
Diffstat (limited to 'src/node_buffer.h')
-rw-r--r-- | src/node_buffer.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/node_buffer.h b/src/node_buffer.h index ca9a135e9df..78e6e42f6cb 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -26,6 +26,10 @@ #include "smalloc.h" #include "v8.h" +#if defined(NODE_WANT_INTERNALS) +#include "env.h" +#endif // defined(NODE_WANT_INTERNALS) + namespace node { namespace Buffer { @@ -56,6 +60,20 @@ NODE_EXTERN v8::Local<v8::Object> New(char* data, // TODO(trevnorris): should be New() for consistency NODE_EXTERN v8::Local<v8::Object> Use(char* data, uint32_t len); +// Internal. Not for public consumption. We can't define these in +// src/node_internals.h due to a circular dependency issue with +// the smalloc.h and node_internals.h headers. +#if defined(NODE_WANT_INTERNALS) +v8::Local<v8::Object> New(Environment* env, size_t size); +v8::Local<v8::Object> New(Environment* env, const char* data, size_t len); +v8::Local<v8::Object> New(Environment* env, + char* data, + size_t length, + smalloc::FreeCallback callback, + void* hint); +v8::Local<v8::Object> Use(Environment* env, char* data, uint32_t length); +#endif // defined(NODE_WANT_INTERNALS) + } // namespace Buffer } // namespace node |