Browse Source

Replace DEFINE_SIMPLE_CALLBACK macros with explicit functions

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
b66c5c9808
  1. 14
      src/net.cc

14
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<FunctionTemplate> Server::constructor_template;

Loading…
Cancel
Save