diff options
author | Stéphan Kochen <stephan@kochen.nl> | 2010-10-21 11:37:08 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-10-22 13:32:31 -0700 |
commit | d9b08d66d6a7999601bc05a20f477e40c9dc1d71 (patch) | |
tree | 521022b0c00945efe47b51e31a4535960842b545 /src | |
parent | b2969a9155ff3a141fa1985cc20499b62990a783 (diff) | |
download | node-new-d9b08d66d6a7999601bc05a20f477e40c9dc1d71.tar.gz |
Remove old interface remains from Buffer.
These were all lacking implementation, so deprecating wouldn't help.
Diffstat (limited to 'src')
-rw-r--r-- | src/node_buffer.cc | 1 | ||||
-rw-r--r-- | src/node_buffer.h | 23 |
2 files changed, 2 insertions, 22 deletions
diff --git a/src/node_buffer.cc b/src/node_buffer.cc index bc9ef0426a..43ecb324e3 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -168,7 +168,6 @@ Handle<Value> Buffer::New(const Arguments &args) { Buffer::Buffer(size_t length) : ObjectWrap() { - off_ = 0; length_ = length; data_ = new char[length_]; diff --git a/src/node_buffer.h b/src/node_buffer.h index d191eb62e3..5fa8c8aa55 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -13,22 +13,11 @@ namespace node { * individual bytes with [] and slice it into substrings or sub-buffers * without copying memory. * - * // return an ascii encoded string - no memory iscopied - * buffer.asciiSlide(0, 3) - * - * // returns another buffer - no memory is copied - * buffer.slice(0, 3) - * - * Interally, each javascript buffer object is backed by a "struct buffer" - * object. These "struct buffer" objects are either a root buffer (in the - * case that buffer->root == NULL) or slice objects (in which case - * buffer->root != NULL). A root buffer is only GCed once all its slices - * are GCed. + * // return an ascii encoded string - no memory is copied + * buffer.asciiSlice(0, 3) */ -struct Blob_; - class Buffer : public ObjectWrap { public: ~Buffer(); @@ -46,20 +35,15 @@ class Buffer : public ObjectWrap { return NULL; } - size_t length() const { assert(0 && "v0.3 API change: Use node::Buffer::Length()."); return 0; } - int AsciiWrite(char *string, int offset, int length); - int Utf8Write(char *string, int offset, int length); - private: static v8::Persistent<v8::FunctionTemplate> constructor_template; static v8::Handle<v8::Value> New(const v8::Arguments &args); - static v8::Handle<v8::Value> Slice(const v8::Arguments &args); static v8::Handle<v8::Value> BinarySlice(const v8::Arguments &args); static v8::Handle<v8::Value> AsciiSlice(const v8::Arguments &args); static v8::Handle<v8::Value> Base64Slice(const v8::Arguments &args); @@ -70,13 +54,10 @@ class Buffer : public ObjectWrap { static v8::Handle<v8::Value> Utf8Write(const v8::Arguments &args); static v8::Handle<v8::Value> ByteLength(const v8::Arguments &args); static v8::Handle<v8::Value> MakeFastBuffer(const v8::Arguments &args); - static v8::Handle<v8::Value> Unpack(const v8::Arguments &args); static v8::Handle<v8::Value> Copy(const v8::Arguments &args); Buffer(size_t length); - Buffer(Buffer *parent, size_t start, size_t end); - size_t off_; size_t length_; char* data_; }; |