From: Mikkel Bruun Date: 2001-10-22T18:15:42+09:00 Subject: [ruby-talk:22944] rb_iterate help needed... Hi guys, ive asked this before, but i just cant seem to get it right... Im trying to manke an extenstion in c that uses the excellent NQMXL. In the c code i have to call the NQXML handle method, that takes a symbol, a string and a block a parameters. As shown in the ruby code below: @nd.handle(:start_element, "element" ){ |e| puts e } In c, that means that i have to use the rb_iterate method, which looks like this rb_iterate(VALUE (*method)(), VALUE args, VALUE (*block)(), VALUE arg2") So, the .handle method should go instead of method, the symbol and the string should be contained in args. *block should be puts. but i somehow cant get it to work. Should the *method be a refrence to an ID??? should *block??? I really cant see how to do it... thanks in advance.... :: Mikkel Bruun