Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Sep 9, 2010
1 parent efc7237 commit 380d128
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/node_buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,40 +125,6 @@ static size_t ByteLength (Handle<String> string, enum encoding enc) {
}



#if 0
// When someone calls buffer.asciiSlice, data is not copied. Instead V8
// references in the underlying Blob with this ExternalAsciiStringResource.
class AsciiSliceExt: public String::ExternalAsciiStringResource {
friend class Buffer;
public:
AsciiSliceExt(Buffer *parent, size_t start, size_t end) {
blob_ = parent->blob();
blob_ref(blob_);

assert(start <= end);
length_ = end - start;
assert(start + length_ <= parent->length());
data_ = parent->data() + start;
}


~AsciiSliceExt() {
//fprintf(stderr, "free ascii slice (%d refs left)\n", blob_->refs);
blob_unref(blob_);
}


const char* data() const { return data_; }
size_t length() const { return length_; }

private:
const char *data_;
size_t length_;
Blob *blob_;
};
#endif

Buffer* Buffer::New(size_t size) {
HandleScope scope;

Expand Down

0 comments on commit 380d128

Please sign in to comment.