Forum: Ruby ruby.h (et al.) documentation for D bindings

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Tomash (Guest)
on 2009-05-04 18:21
(Received via mailing list)
Hi,

I'm writing a library for developing Ruby native extensions in D
language
http://github.com/tomash/rudy/tree/master

One of the most important parts of it is a set of bindings -- ruby.d
converted from ruby.h via a special program for that (D language
cannot read C .h files). As for now I've been OK with (sparse)
documentation in README.EXT and pickaxe book, with occassional
googling thrown in. But I'm in bigger and bigger need for a decent
Ruby API .h reference, with explanations on what do functions do (for
instance, what's the difference between rb_str_new, rb_str_new2 and
rb_str_new3) -- their names are sometimes not enough.

I know about Doxygen, but it's just listing methods and references,
not giving a lot of helpful explanation. So, could you point me to
some resource documenting Ruby's C API with all its subtleties?

Question as for now: I have a C float/double variable, I want to
convert it to Ruby's Float. Only function I've found is rb_dbl2big and
I'd love to convert to Float, not BigNum. It's documentation and
implementation on Doxygen is quite cryptic, to be honest.

Thanks in advance!
Tomek "Tomash" Stachewicz
Tomash (Guest)
on 2009-05-04 18:35
(Received via mailing list)
OK, I've found rb_float_new -- so my last question is irrelevant.
Corelib.rubyonrails with "view source" for the win!

Question about good API reference still prevails though :)
This topic is locked and can not be replied to.