K
Kaspar Schiess
Hello all,
In a sharing mood: Am I the only one who did not see how this can be done ?
Ruby's C API is so elegant, I feel shabby next to it sometimes. I was
trying to get my hands on a continuation from C code lately (for various
reasons that shall not be disclosed publicly, as is often the case with
cc's). Looking up in ruby.h came up with no match for 'callcc', so I
checked in README.EXT (ups should have started there), nothing either.
Looking at eval.c I got disappointed: the thing is declared static
(rb_callcc). Probably for some good reason.
The thing I came up with is this:
http://www.tua.ch/ruby/rubycc/rubycc.html
That couldn't possibly work.
But it actually does. Thank you matz !
kaspar
code manufacture - ruby lab
www.tua.ch/ruby
In a sharing mood: Am I the only one who did not see how this can be done ?
Ruby's C API is so elegant, I feel shabby next to it sometimes. I was
trying to get my hands on a continuation from C code lately (for various
reasons that shall not be disclosed publicly, as is often the case with
cc's). Looking up in ruby.h came up with no match for 'callcc', so I
checked in README.EXT (ups should have started there), nothing either.
Looking at eval.c I got disappointed: the thing is declared static
(rb_callcc). Probably for some good reason.
The thing I came up with is this:
http://www.tua.ch/ruby/rubycc/rubycc.html
That couldn't possibly work.
But it actually does. Thank you matz !
kaspar
code manufacture - ruby lab
www.tua.ch/ruby