diff options
author | Trevor Norris <trev.norris@gmail.com> | 2013-10-29 12:27:24 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2013-10-29 15:09:44 -0700 |
commit | 93f75a86bf6c87aa897312740aab61282b0eff1d (patch) | |
tree | 18c33d405b8f22bfeeb1a35cba45fa3b9d9703ed /src/fs_event_wrap.cc | |
parent | 4b84e42f67d7754574bf7d289524f6dffcb5e14a (diff) | |
download | android-node-v8-93f75a86bf6c87aa897312740aab61282b0eff1d.tar.gz android-node-v8-93f75a86bf6c87aa897312740aab61282b0eff1d.tar.bz2 android-node-v8-93f75a86bf6c87aa897312740aab61282b0eff1d.zip |
src: use function to get internal pointer
Remove the NODE_{WRAP,UNWRAP} macros and instead use template functions.
Diffstat (limited to 'src/fs_event_wrap.cc')
-rw-r--r-- | src/fs_event_wrap.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 63912f4358..b6631844b4 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -21,6 +21,8 @@ #include "env.h" #include "env-inl.h" +#include "util.h" +#include "util-inl.h" #include "node.h" #include "handle_wrap.h" @@ -98,8 +100,7 @@ void FSEventWrap::New(const FunctionCallbackInfo<Value>& args) { void FSEventWrap::Start(const FunctionCallbackInfo<Value>& args) { HandleScope scope(node_isolate); - FSEventWrap* wrap; - NODE_UNWRAP(args.This(), FSEventWrap, wrap); + FSEventWrap* wrap = UnwrapObject<FSEventWrap>(args.This()); if (args.Length() < 1 || !args[0]->IsString()) { return ThrowTypeError("Bad arguments"); @@ -178,8 +179,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename, void FSEventWrap::Close(const FunctionCallbackInfo<Value>& args) { HandleScope scope(node_isolate); - FSEventWrap* wrap; - NODE_UNWRAP_NO_ABORT(args.This(), FSEventWrap, wrap); + FSEventWrap* wrap = UnwrapObject<FSEventWrap>(args.This()); if (wrap == NULL || wrap->initialized_ == false) return; |