diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-09-05 07:59:24 +0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-09-09 22:03:48 +0400 |
commit | 1cf538a60a5306a554d3cfad412003578a96d5e5 (patch) | |
tree | 3f9456697ea92f82b760806c0c1f9a9ca36affd1 /src/node_buffer.h | |
parent | 2dda6be7991fc6809eedca4dc51935a178c63745 (diff) |
Work to get C++ fast buffers. incomplete
Diffstat (limited to 'src/node_buffer.h')
-rw-r--r-- | src/node_buffer.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/node_buffer.h b/src/node_buffer.h index e1c037120a2..f538f750999 100644 --- a/src/node_buffer.h +++ b/src/node_buffer.h @@ -34,11 +34,10 @@ class Buffer : public ObjectWrap { static void Initialize(v8::Handle<v8::Object> target); static Buffer* New(size_t length); // public constructor - static inline bool HasInstance(v8::Handle<v8::Value> val) { - if (!val->IsObject()) return false; - v8::Local<v8::Object> obj = val->ToObject(); - return constructor_template->HasInstance(obj); - } + static bool HasInstance(v8::Handle<v8::Value> val); + + static char* Data(v8::Handle<v8::Object>); + static size_t Length(v8::Handle<v8::Object>); char* data(); size_t length() const { return length_; } |