From 41ad6e3965609ef9025a0a2d93622b65848f369b Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 22 Sep 2016 10:36:13 +0200 Subject: [PATCH] src: rename handle__ to handle_ in HandleWrap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 46633934fed7dfce289298cf16ea0f4161b77bb7 (src: pull OnConnection from pipe_wrap and tcp_wrap) removed the private handle_ member from TCPWrap which should allow us to rename the private handle__ member in HandleWrap. PR-URL: https://github.com/nodejs/node/pull/8712 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell Reviewed-By: Ilkka Myller --- src/handle_wrap.cc | 6 +++--- src/handle_wrap.h | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/handle_wrap.cc b/src/handle_wrap.cc index daf821e1d2a197..317fb48b1d28e3 100644 --- a/src/handle_wrap.cc +++ b/src/handle_wrap.cc @@ -56,7 +56,7 @@ void HandleWrap::Close(const FunctionCallbackInfo& args) { return; CHECK_EQ(false, wrap->persistent().IsEmpty()); - uv_close(wrap->handle__, OnClose); + uv_close(wrap->handle_, OnClose); wrap->state_ = kClosing; if (args[0]->IsFunction()) { @@ -73,8 +73,8 @@ HandleWrap::HandleWrap(Environment* env, AsyncWrap* parent) : AsyncWrap(env, object, provider, parent), state_(kInitialized), - handle__(handle) { - handle__->data = this; + handle_(handle) { + handle_->data = this; HandleScope scope(env->isolate()); Wrap(object, this); env->handle_wrap_queue()->PushBack(this); diff --git a/src/handle_wrap.h b/src/handle_wrap.h index 60f30fbd10575b..2a128dd8b1679d 100644 --- a/src/handle_wrap.h +++ b/src/handle_wrap.h @@ -47,7 +47,7 @@ class HandleWrap : public AsyncWrap { return IsAlive(wrap) && uv_has_ref(wrap->GetHandle()); } - inline uv_handle_t* GetHandle() const { return handle__; } + inline uv_handle_t* GetHandle() const { return handle_; } protected: HandleWrap(Environment* env, @@ -63,9 +63,7 @@ class HandleWrap : public AsyncWrap { static void OnClose(uv_handle_t* handle); ListNode handle_wrap_queue_; enum { kInitialized, kClosing, kClosingWithCallback, kClosed } state_; - // Using double underscore due to handle_ member in tcp_wrap. Probably - // tcp_wrap should rename it's member to 'handle'. - uv_handle_t* const handle__; + uv_handle_t* const handle_; };