From b66c5c9808acc182cf16ad50e10db1900963fb3d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 3 Oct 2009 14:45:35 +0200 Subject: [PATCH] Replace DEFINE_SIMPLE_CALLBACK macros with explicit functions --- src/net.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/net.cc b/src/net.cc index 53670dd05d..d1d449fa0f 100644 --- a/src/net.cc +++ b/src/net.cc @@ -403,15 +403,15 @@ void Connection::OnConnect() { Emit("connect", 0, NULL); } -#define DEFINE_SIMPLE_CALLBACK(name, type) \ -void name() \ -{ \ - HandleScope scope; \ - Emit(type, 0, NULL); \ +void Connection::OnTimeout() { + HandleScope scope; + Emit("timeout", 0, NULL); } -DEFINE_SIMPLE_CALLBACK(Connection::OnTimeout, "timeout") -DEFINE_SIMPLE_CALLBACK(Connection::OnEOF, "eof") +void Connection::OnEOF() { + HandleScope scope; + Emit("eof", 0, NULL); +} Persistent Server::constructor_template;