diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-05-27 23:31:31 +0200 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-05-30 11:45:37 +0100 |
commit | 820aaf5b3d2728d900ba0ff8903d343840766912 (patch) | |
tree | 7d92e15e13be35090b64746efe5e05fc9e3aa735 /src/stream_wrap.cc | |
parent | c7b02034ef80313564c50c59c63a5b640c24e234 (diff) | |
download | android-node-v8-820aaf5b3d2728d900ba0ff8903d343840766912.tar.gz android-node-v8-820aaf5b3d2728d900ba0ff8903d343840766912.tar.bz2 android-node-v8-820aaf5b3d2728d900ba0ff8903d343840766912.zip |
src: replace CONTAINER_OF with type-safe function
Replace the CONTAINER_OF macro with a template function that is as
type-safe as a reinterpret_cast<> of an arbitrary pointer can be made.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'src/stream_wrap.cc')
-rw-r--r-- | src/stream_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 069d17bcc5..026e204929 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -510,7 +510,7 @@ void StreamWrap::SetBlocking(const FunctionCallbackInfo<Value>& args) { } void StreamWrap::AfterWrite(uv_write_t* req, int status) { - WriteWrap* req_wrap = CONTAINER_OF(req, WriteWrap, req_); + WriteWrap* req_wrap = ContainerOf(&WriteWrap::req_, req); StreamWrap* wrap = req_wrap->wrap(); Environment* env = wrap->env(); |