Rename SlowBuffer in binding

This commit is contained in:
Ryan Dahl 2010-09-07 23:52:40 -07:00
parent 5bc4efe820
commit b8bfbdab48
2 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
var SlowBuffer = process.binding('buffer').Buffer; var SlowBuffer = process.binding('buffer').SlowBuffer;
function toHex (n) { function toHex (n) {

View File

@ -579,7 +579,7 @@ void Buffer::Initialize(Handle<Object> target) {
Local<FunctionTemplate> t = FunctionTemplate::New(Buffer::New); Local<FunctionTemplate> t = FunctionTemplate::New(Buffer::New);
constructor_template = Persistent<FunctionTemplate>::New(t); constructor_template = Persistent<FunctionTemplate>::New(t);
constructor_template->InstanceTemplate()->SetInternalFieldCount(1); constructor_template->InstanceTemplate()->SetInternalFieldCount(1);
constructor_template->SetClassName(String::NewSymbol("Buffer")); constructor_template->SetClassName(String::NewSymbol("SlowBuffer"));
// copy free // copy free
NODE_SET_PROTOTYPE_METHOD(constructor_template, "binarySlice", Buffer::BinarySlice); NODE_SET_PROTOTYPE_METHOD(constructor_template, "binarySlice", Buffer::BinarySlice);
@ -602,7 +602,7 @@ void Buffer::Initialize(Handle<Object> target) {
"makeFastBuffer", "makeFastBuffer",
Buffer::MakeFastBuffer); Buffer::MakeFastBuffer);
target->Set(String::NewSymbol("Buffer"), constructor_template->GetFunction()); target->Set(String::NewSymbol("SlowBuffer"), constructor_template->GetFunction());
} }