From b8bfbdab48d5ea08dd0f42cdb1a02f8b07490247 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 7 Sep 2010 23:52:40 -0700 Subject: [PATCH] Rename SlowBuffer in binding --- lib/buffer.js | 2 +- src/node_buffer.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/buffer.js b/lib/buffer.js index f6fc756101..3fb35f6a2c 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -1,4 +1,4 @@ -var SlowBuffer = process.binding('buffer').Buffer; +var SlowBuffer = process.binding('buffer').SlowBuffer; function toHex (n) { diff --git a/src/node_buffer.cc b/src/node_buffer.cc index f9d99b56c1..10ddbaf72b 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -579,7 +579,7 @@ void Buffer::Initialize(Handle target) { Local t = FunctionTemplate::New(Buffer::New); constructor_template = Persistent::New(t); constructor_template->InstanceTemplate()->SetInternalFieldCount(1); - constructor_template->SetClassName(String::NewSymbol("Buffer")); + constructor_template->SetClassName(String::NewSymbol("SlowBuffer")); // copy free NODE_SET_PROTOTYPE_METHOD(constructor_template, "binarySlice", Buffer::BinarySlice); @@ -602,7 +602,7 @@ void Buffer::Initialize(Handle target) { "makeFastBuffer", Buffer::MakeFastBuffer); - target->Set(String::NewSymbol("Buffer"), constructor_template->GetFunction()); + target->Set(String::NewSymbol("SlowBuffer"), constructor_template->GetFunction()); }