Skip to content

Commit

Permalink
Revert "Remove process.unloop()"
Browse files Browse the repository at this point in the history
People need this for backwards compatibility. Will be removed soon though!

This reverts commit 1e710ca.
  • Loading branch information
ry committed Mar 4, 2010
1 parent 1e710ca commit e6dbf8d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/node.cc
Expand Up @@ -424,6 +424,19 @@ static Handle<Value> Loop(const Arguments& args) {
return Undefined();
}

static Handle<Value> Unloop(const Arguments& args) {
HandleScope scope;
int how = EVUNLOOP_ONE;
if (args[0]->IsString()) {
String::Utf8Value how_s(args[0]->ToString());
if (0 == strcmp(*how_s, "all")) {
how = EVUNLOOP_ALL;
}
}
ev_unloop(EV_DEFAULT_ how);
return Undefined();
}

static Handle<Value> Chdir(const Arguments& args) {
HandleScope scope;

Expand Down Expand Up @@ -1036,6 +1049,7 @@ static void Load(int argc, char *argv[]) {

// define various internal methods
NODE_SET_METHOD(process, "loop", Loop);
NODE_SET_METHOD(process, "unloop", Unloop);
NODE_SET_METHOD(process, "compile", Compile);
NODE_SET_METHOD(process, "_byteLength", ByteLength);
NODE_SET_METHOD(process, "reallyExit", Exit);
Expand Down

0 comments on commit e6dbf8d

Please sign in to comment.