Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
add post_init, though I think this will be useless in the new scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedouglas committed Sep 2, 2009
1 parent 98c78e4 commit b0d0499
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/rubymain.cpp
Expand Up @@ -29,6 +29,7 @@ static VALUE Intern_reactor;
static VALUE Intern_receive_data;
static VALUE Intern_initialize;
static VALUE Intern_unbind;
static VALUE Intern_post_init;

static void evma_callback_loopbreak(VALUE reactor)
{
Expand Down Expand Up @@ -80,6 +81,7 @@ static void evma_callback_accept(VALUE acceptor, ConnectionDescriptor *cd)
callargs[i] = rb_ary_shift(argv);
}
rb_funcall2(conn, Intern_initialize, argc, callargs);
rb_funcall(conn, Intern_post_init, 0);
}
}

Expand Down Expand Up @@ -215,6 +217,7 @@ static VALUE evma_connect_tcp(int argc, VALUE *argv, VALUE reactor)
rb_funcall2(cdobj, Intern_initialize, callargc, callargv);
}

rb_funcall(cdobj, Intern_post_init, 0);
cd->SetBinding(cdobj);
return cdobj;
}
Expand Down Expand Up @@ -270,6 +273,7 @@ extern "C" void Init_rubyeventmachine()
Intern_receive_data = rb_intern("receive_data");
Intern_initialize = rb_intern("initialize");
Intern_unbind = rb_intern("unbind");
Intern_post_init = rb_intern("post_init");

rb_define_alloc_func(EmReactor, evma_reactor_alloc);

Expand Down

0 comments on commit b0d0499

Please sign in to comment.