From 820aaf5b3d2728d900ba0ff8903d343840766912 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 27 May 2014 23:31:31 +0200 Subject: 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 --- src/signal_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/signal_wrap.cc') diff --git a/src/signal_wrap.cc b/src/signal_wrap.cc index e1ec2fd21a..a50340d511 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()); -- cgit v1.2.3