diff options
author | Pavel Lang <langpavel@phpskelet.org> | 2012-09-13 10:31:50 +0400 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2012-09-13 18:31:04 +0400 |
commit | 7ab4a77d6fdb2b98b3c34fda9d001ed9d91297c7 (patch) | |
tree | 36fca8570400cde2450814a42b12b5a515f5dbbc /src/node_buffer.h | |
parent | bec863b7de8ab45cf599372b16274fa526bd86a0 (diff) |
buffer: update constructor prototype
Change Buffer::New(char*, size_t) to Buffer::New(const char*, size_t).
Diffstat (limited to 'src/node_buffer.h')
-rw-r--r-- | src/node_buffer.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/node_buffer.h b/src/node_buffer.h index a092faa756b..137a6cfb402 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -102,10 +102,14 @@ class NODE_EXTERN Buffer: public ObjectWrap { static v8::Handle<v8::Object> New(v8::Handle<v8::String> string); static void Initialize(v8::Handle<v8::Object> target); - static Buffer* New(size_t length); // public constructor - static Buffer* New(char *data, size_t len); // public constructor + + // public constructor + static Buffer* New(size_t length); + // public constructor - data is copied + static Buffer* New(const char *data, size_t len); + // public constructor static Buffer* New(char *data, size_t length, - free_callback callback, void *hint); // public constructor + free_callback callback, void *hint); private: static v8::Handle<v8::Value> New(const v8::Arguments &args); |