From: ts Date: 2001-07-20T23:23:14+09:00 Subject: [ruby-talk:18187] Re: Invoking a method from C side >>>>> "L" == Lothar Scholz writes: L> The "method_call" function is declared private. So how can i L> make a " methodobj.call("foo") " call from the C-Side without L> to much overhead. rb_funcall(methodobj, rb_intern("call"), 1, rb_str_new2("foo")); L> Isn't it possible to make "method_call" and the rb_cMethod variable L> public (Of course method_call should be renamed to rb_method_call") ? Try this pigeon% grep \"call\" *.c eval.c: return rb_funcall2(cmd, rb_intern("call"), eval.c: call_trace_func("call", b2->nd_file, nd_line(b2), eval.c: rb_define_method(rb_cProc, "call", proc_call, -2); eval.c: rb_define_method(rb_cMethod, "call", method_call, -1); eval.c: rb_define_method(rb_cUnboundMethod, "call", umethod_call, -1); eval.c: rb_define_method(rb_cCont, "call", rb_cont_call, -1); marshal.c: rb_funcall(arg->proc, rb_intern("call"), 1, v); pigeon% #call is defined for Proc, Method, UnboundMethod and Continuation. This mean that in your C program you'll end by making the test for all possibles calls. Guy Decoux