>>>>> "B" == Basile STARYNKEVITCH <basile-news / starynkevitch.net> writes: B> Guis::on_end_of_input do |timeout| B> ## do something useful, for example B> $stderr.printf("goodbye world with timeout %d\n", timeout) B> end Well, I've well understood * Guis::on_end_of_input create a lambda() and store it as a variable (thread local, instance, global, ... it depend what you want to do) B> Then I want my C routine end_of_input_hook(int timeout) to call the B> block passed to on_end_of_input * end_of_input_hook(int timeout) retrieve this variable and call it with timeout as argument Guy Decoux