summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 11:45:32 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-30 11:45:32 +0000
commita85a5beac0a310f31f4401efd2886f7d4c94df2a (patch)
tree13fa02c5c30f2d00ec9d77c18e89361402c81be9
parente83d6088b590105f3904a4cafca02923b66e08aa (diff)
downloadruby-a85a5beac0a310f31f4401efd2886f7d4c94df2a.tar.gz
ruby-a85a5beac0a310f31f4401efd2886f7d4c94df2a.tar.xz
ruby-a85a5beac0a310f31f4401efd2886f7d4c94df2a.zip
Add more description about Fixnum's size. [ruby-core:27333]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--README.EXT6
1 files changed, 4 insertions, 2 deletions
diff --git a/README.EXT b/README.EXT
index e29b3ae89..30269eb74 100644
--- a/README.EXT
+++ b/README.EXT
@@ -94,8 +94,10 @@ respectively. They are singletons for the data type.
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