diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-05-28 01:31:31 +0400 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-05-30 14:45:37 +0400 |
commit | 820aaf5b3d2728d900ba0ff8903d343840766912 (patch) | |
tree | 7d92e15e13be35090b64746efe5e05fc9e3aa735 /src/signal_wrap.cc | |
parent | c7b02034ef80313564c50c59c63a5b640c24e234 (diff) |
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/signal_wrap.cc')
-rw-r--r-- | src/signal_wrap.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index e1ec2fd21a7..a50340d511a 100644 --- a/src/signal_wrap.cc +++ b/src/signal_wrap.cc @@ -105,7 +105,7 @@ class SignalWrap : public HandleWrap { } static void OnSignal(uv_signal_t* handle, int signum) { - SignalWrap* wrap = CONTAINER_OF(handle, SignalWrap, handle_); + SignalWrap* wrap = ContainerOf(&SignalWrap::handle_, handle); Environment* env = wrap->env(); HandleScope handle_scope(env->isolate()); Context::Scope context_scope(env->context()); |