Jan Dvorak
12/17/2007 12:30:00 PM
Hello,
For ruby 1.8 i used registering at_exit in C via eval (quite hackish i know)
as in:
void Init_Mymodule()
{
...
module = rb_define_module("Mymodule");
rb_define_module_function(module,"myfunc", ...
...
rb_eval_string("at_exit do Mymodule.myfunc end");
}
but that doesn't work with 1.9/head anymore (crash). However when i move the
at_exit call to the ruby script which uses the extension, it works just fine.
So, what is the correct way of using at_exit for C extension function ?
Thanks,
Jan