Skip to content
Browse files

stream_wrap: update after libuv API change

  • Loading branch information...
1 parent 28998a8 commit 2aefea5a2f9291303b64b74ba9144dcc9d6611f6 @bnoordhuis bnoordhuis committed
Showing with 4 additions and 4 deletions.
  1. +3 −3 src/stream_wrap.cc
  2. +1 −1 src/stream_wrap.h
View
6 src/stream_wrap.cc
@@ -129,11 +129,11 @@ inline char* StreamWrap::NewSlab(Handle<Object> global,
}
-uv_buf_t StreamWrap::OnAlloc(uv_stream_t* handle, size_t suggested_size) {
+uv_buf_t StreamWrap::OnAlloc(uv_handle_t* handle, size_t suggested_size) {
HandleScope scope;
StreamWrap* wrap = static_cast<StreamWrap*>(handle->data);
- assert(wrap->stream_ == handle);
+ assert(wrap->stream_ == reinterpret_cast<uv_stream_t*>(handle));
char* slab = NULL;
@@ -165,7 +165,7 @@ uv_buf_t StreamWrap::OnAlloc(uv_stream_t* handle, size_t suggested_size) {
wrap->slab_offset_ = slab_used;
slab_used += buf.len;
- handle_that_last_alloced = handle;
+ handle_that_last_alloced = reinterpret_cast<uv_stream_t*>(handle);
return buf;
}
View
2 src/stream_wrap.h
@@ -31,7 +31,7 @@ class StreamWrap : public HandleWrap {
// Callbacks for libuv
static void AfterWrite(uv_write_t* req, int status);
- static uv_buf_t OnAlloc(uv_stream_t* handle, size_t suggested_size);
+ static uv_buf_t OnAlloc(uv_handle_t* handle, size_t suggested_size);
static void OnRead(uv_stream_t* handle, ssize_t nread, uv_buf_t buf);
static void AfterShutdown(uv_shutdown_t* req, int status);

0 comments on commit 2aefea5

Please sign in to comment.
Something went wrong with that request. Please try again.