なかだです。 At Tue, 18 Mar 2003 03:32:06 +0900, Kazuo Saito wrote: > ruby-talk をみていて [ruby-talk:66990] が目に止まりました。 > float/double を C の値に変換したいんだけど、どうも rb_float_new の説明が > あるのは日本語版の README.EXT.ja だけみたいだ、という話です。 これは私も気にはなってたんですが。 > @@ -93,7 +94,9 @@ > some machines), which can be convert to a C integer by using the > FIX2INT() macro. There is also NUM2INT() which converts any Ruby > numbers into C integers. The NUM2INT() macro includes a type check, so > -an exception will be raised if the conversion failed. > +an exception will be raised if the conversion failed. There are also > +a macro NUM2DBL() to retrieve the double float value and STR2CSTR() is > +useful to get the string as char*. どうせなら、STR2CSTR()じゃなくてStringValuePtr()とかにしたいで すね。README.EXT.jaのほうも含めて。 -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦