From 613d76ef6a00ec091367de1e63bc51e3ab672cbd Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Tue, 29 Oct 2013 13:23:58 -0700 Subject: [PATCH] src: shorten Object{Wrap,Unwrap} Going back to the original names of Wrap/Unwrap now that most all the class members that duplicate the name and functionality have been removed. --- src/fs_event_wrap.cc | 4 +- src/handle_wrap.cc | 8 +-- src/node_contextify.cc | 14 ++-- src/node_crypto.cc | 134 +++++++++++++++++++-------------------- src/node_http_parser.cc | 8 +-- src/node_stat_watcher.cc | 4 +- src/node_wrap.h | 6 +- src/node_zlib.cc | 10 +-- src/pipe_wrap.cc | 12 ++-- src/process_wrap.cc | 6 +- src/signal_wrap.cc | 4 +- src/stream_wrap.cc | 18 +++--- src/tcp_wrap.cc | 24 +++---- src/timer_wrap.cc | 10 +-- src/tls_wrap.cc | 20 +++--- src/tty_wrap.cc | 4 +- src/udp_wrap.cc | 16 ++--- src/util-inl.h | 4 +- src/util.h | 4 +- src/weak-object-inl.h | 2 +- 20 files changed, 156 insertions(+), 156 deletions(-) diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index b6631844b4..dad930ae0b 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -100,7 +100,7 @@ void FSEventWrap::New(const FunctionCallbackInfo& args) { void FSEventWrap::Start(const FunctionCallbackInfo& args) { HandleScope scope(node_isolate); - FSEventWrap* wrap = UnwrapObject(args.This()); + FSEventWrap* wrap = Unwrap(args.This()); if (args.Length() < 1 || !args[0]->IsString()) { return ThrowTypeError("Bad arguments"); @@ -179,7 +179,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename, void FSEventWrap::Close(const FunctionCallbackInfo& args) { HandleScope scope(node_isolate); - FSEventWrap* wrap = UnwrapObject(args.This()); + FSEventWrap* wrap = Unwrap(args.This()); if (wrap == NULL || wrap->initialized_ == false) return; diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index 71e395340c..d930bd355b 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -44,7 +44,7 @@ extern QUEUE handle_wrap_queue; void HandleWrap::Ref(const FunctionCallbackInfo& args) { HandleScope scope(node_isolate); - HandleWrap* wrap = UnwrapObject(args.This()); + HandleWrap* wrap = Unwrap(args.This()); if (wrap != NULL && wrap->handle__ != NULL) { uv_ref(wrap->handle__); @@ -56,7 +56,7 @@ void HandleWrap::Ref(const FunctionCallbackInfo& args) { void HandleWrap::Unref(const FunctionCallbackInfo& args) { HandleScope scope(node_isolate); - HandleWrap* wrap = UnwrapObject(args.This()); + HandleWrap* wrap = Unwrap(args.This()); if (wrap != NULL && wrap->handle__ != NULL) { uv_unref(wrap->handle__); @@ -68,7 +68,7 @@ void HandleWrap::Unref(const FunctionCallbackInfo& args) { void HandleWrap::Close(const FunctionCallbackInfo& args) { HandleScope scope(node_isolate); - HandleWrap* wrap = UnwrapObject(args.This()); + HandleWrap* wrap = Unwrap(args.This()); // guard against uninitialized handle or double close if (wrap == NULL || wrap->handle__ == NULL) @@ -95,7 +95,7 @@ HandleWrap::HandleWrap(Environment* env, handle__->data = this; HandleScope scope(node_isolate); persistent().Reset(node_isolate, object); - WrapObject(object, this); + Wrap(object, this); QUEUE_INSERT_TAIL(&handle_wrap_queue, &handle_wrap_queue_); } diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 1b3ef355c4..ae3e4ace4a 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -180,7 +180,7 @@ class ContextifyContext { HandleScope scope(node_isolate); Local wrapper = env->script_data_constructor_function()->NewInstance(); - WrapObject(wrapper, this); + Wrap(wrapper, this); return scope.Close(wrapper); } @@ -300,7 +300,7 @@ class ContextifyContext { HandleScope scope(node_isolate); ContextifyContext* ctx = - UnwrapObject(args.Data().As()); + Unwrap(args.Data().As()); Local sandbox = PersistentToLocal(node_isolate, ctx->sandbox_); Local rv = sandbox->GetRealNamedProperty(property); @@ -324,7 +324,7 @@ class ContextifyContext { HandleScope scope(node_isolate); ContextifyContext* ctx = - UnwrapObject(args.Data().As()); + Unwrap(args.Data().As()); PersistentToLocal(node_isolate, ctx->sandbox_)->Set(property, value); } @@ -336,7 +336,7 @@ class ContextifyContext { HandleScope scope(node_isolate); ContextifyContext* ctx = - UnwrapObject(args.Data().As()); + Unwrap(args.Data().As()); Local sandbox = PersistentToLocal(node_isolate, ctx->sandbox_); Local proxy_global = PersistentToLocal(node_isolate, @@ -357,7 +357,7 @@ class ContextifyContext { HandleScope scope(node_isolate); ContextifyContext* ctx = - UnwrapObject(args.Data().As()); + Unwrap(args.Data().As()); bool success = PersistentToLocal(node_isolate, ctx->sandbox_)->Delete(property); @@ -374,7 +374,7 @@ class ContextifyContext { HandleScope scope(node_isolate); ContextifyContext* ctx = - UnwrapObject(args.Data().As()); + Unwrap(args.Data().As()); Local sandbox = PersistentToLocal(node_isolate, ctx->sandbox_); args.GetReturnValue().Set(sandbox->GetPropertyNames()); @@ -575,7 +575,7 @@ class ContextifyScript : public WeakObject { } ContextifyScript* wrapped_script = - UnwrapObject(args.This()); + Unwrap(args.This()); Local