From 44ad6a7db28578d0828fc3ceade7a6a12ebe7852 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 20 May 2010 09:42:47 -0700 Subject: [PATCH] Make buffer's c++ constructor public --- src/node_buffer.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/node_buffer.h b/src/node_buffer.h index 24ead8701a5..d7c849a7baa 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -30,6 +30,12 @@ struct Blob_; class Buffer : public ObjectWrap { public: + static v8::Persistent constructor_template; + + Buffer(size_t length); + Buffer(Buffer *parent, size_t start, size_t end); + ~Buffer(); + static void Initialize(v8::Handle target); static inline bool HasInstance(v8::Handle val) { if (!val->IsObject()) return false; @@ -42,7 +48,6 @@ class Buffer : public ObjectWrap { struct Blob_* blob() const { return blob_; } protected: - static v8::Persistent constructor_template; static v8::Handle New(const v8::Arguments &args); static v8::Handle Slice(const v8::Arguments &args); static v8::Handle BinarySlice(const v8::Arguments &args); @@ -59,10 +64,6 @@ class Buffer : public ObjectWrap { int Utf8Write(char *string, int offset, int length); private: - Buffer(size_t length); - Buffer(Buffer *parent, size_t start, size_t end); - ~Buffer(); - size_t off_; // offset inside blob_ size_t length_; // length inside blob_ struct Blob_ *blob_;