Ruby.h (et al.) documentation for D bindings

Hi,

I’m writing a library for developing Ruby native extensions in D
language

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

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 :slight_smile: