Skip to content

Commit 41ad6e3

Browse files
danbevFishrock123
authored andcommitted
src: rename handle__ to handle_ in HandleWrap
Commit 4663393 (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: #8712 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
1 parent 999f727 commit 41ad6e3

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/handle_wrap.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) {
5656
return;
5757

5858
CHECK_EQ(false, wrap->persistent().IsEmpty());
59-
uv_close(wrap->handle__, OnClose);
59+
uv_close(wrap->handle_, OnClose);
6060
wrap->state_ = kClosing;
6161

6262
if (args[0]->IsFunction()) {
@@ -73,8 +73,8 @@ HandleWrap::HandleWrap(Environment* env,
7373
AsyncWrap* parent)
7474
: AsyncWrap(env, object, provider, parent),
7575
state_(kInitialized),
76-
handle__(handle) {
77-
handle__->data = this;
76+
handle_(handle) {
77+
handle_->data = this;
7878
HandleScope scope(env->isolate());
7979
Wrap(object, this);
8080
env->handle_wrap_queue()->PushBack(this);

src/handle_wrap.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class HandleWrap : public AsyncWrap {
4747
return IsAlive(wrap) && uv_has_ref(wrap->GetHandle());
4848
}
4949

50-
inline uv_handle_t* GetHandle() const { return handle__; }
50+
inline uv_handle_t* GetHandle() const { return handle_; }
5151

5252
protected:
5353
HandleWrap(Environment* env,
@@ -63,9 +63,7 @@ class HandleWrap : public AsyncWrap {
6363
static void OnClose(uv_handle_t* handle);
6464
ListNode<HandleWrap> handle_wrap_queue_;
6565
enum { kInitialized, kClosing, kClosingWithCallback, kClosed } state_;
66-
// Using double underscore due to handle_ member in tcp_wrap. Probably
67-
// tcp_wrap should rename it's member to 'handle'.
68-
uv_handle_t* const handle__;
66+
uv_handle_t* const handle_;
6967
};
7068

7169

0 commit comments

Comments
 (0)