[前][次][番号順一覧][スレッド一覧]

ruby-changes:14374

From: naruse <ko1@a...>
Date: Wed, 30 Dec 2009 20:45:41 +0900 (JST)
Subject: [ruby-changes:14374] Ruby:r26204 (trunk): Add more description about Fixnum's size.

naruse	2009-12-30 20:45:32 +0900 (Wed, 30 Dec 2009)

  New Revision: 26204

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26204

  Log:
    Add more description about Fixnum's size. [ruby-core:27333]

  Modified files:
    trunk/README.EXT

Index: README.EXT
===================================================================
--- README.EXT	(revision 26203)
+++ README.EXT	(revision 26204)
@@ -94,8 +94,10 @@
 The equivalent C constants are: Qnil, Qfalse, Qtrue.
 Note that Qfalse is false in C also (i.e. 0), but not Qnil.
 
-The T_FIXNUM data is a 31bit length fixed integer (63bit length on
-some machines), which can be converted to a C integer by using the
+The T_FIXNUM data is a 31bit or 63bit length fixed integer.
+This size is depend on the size of long: if long is 32bit then
+T_FIXNUM is 31bit, if long is 64bit then T_FIXNUM is 63bit.
+T_FIXNUM can be converted to a C integer by using the
 FIX2INT() macro or FIX2LONG().  Though you have to check that the
 data is really FIXNUM before using them, they are faster.  FIX2LONG()
 never raises exceptions, but FIX2INT() raises RangeError if the

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]