mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
buffer: fix gcc 4.2 build breakage
gcc 4.2 on OS X gets confused about the call to node::Buffer::Data().
Fully qualify the function name to help it along.
Fixes the following build error:
../../deps/v8/include/v8.h: In function ‘char*
node::Buffer::Data(v8::Handle<v8::Value>)’:
../../deps/v8/include/v8.h:900: error: ‘class v8::Data’
is not a function,
../../src/node_buffer.h:38: error:
conflict with ‘char* node::Buffer::Data(v8::Handle<v8::Object>)’
../../src/node_buffer.cc:94: error:
in call to ‘Data’
This commit is contained in:
@@ -91,7 +91,9 @@ bool HasInstance(Handle<Object> obj) {
|
||||
|
||||
char* Data(Handle<Value> val) {
|
||||
assert(val->IsObject());
|
||||
return Data(val.As<Object>());
|
||||
// Use a fully qualified name here to work around a bug in gcc 4.2.
|
||||
// It mistakes an unadorned call to Data() for the v8::String::Data type.
|
||||
return node::Buffer::Data(val.As<Object>());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user