summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-03 10:48:12 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-12-03 10:48:12 +0000
commit7031b99bca22bd8fa1d078b182226f59007250f0 (patch)
tree848733a804d2e69247355657ae70a5e45f2113d2 /lib/mkmf.rb
parente18e1314a969ae8ad81a0f83f0100d0a6eeb888e (diff)
* lib/mkmf.rb (check_sizeof): should return integer always.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 7539cf5dba..3e078779c7 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1105,14 +1105,7 @@ def check_sizeof(type, headers = nil, opts = "", &b)
expr = "sizeof((*rbcv_ptr_)#{"." << member if member})"
fmt = STRING_OR_FAILED_FORMAT
checking_for checking_message("size of #{type}", headers), fmt do
- if UNIVERSAL_INTS.include?(type)
- type
- elsif size = UNIVERSAL_INTS.find {|t|
- try_static_assert("#{expr} == sizeof(#{t})", prelude, opts, &b)
- }
- $defs.push(format("-DSIZEOF_%s=SIZEOF_%s", type.tr_cpp, size.tr_cpp))
- size
- elsif size = try_constant(expr, prelude, opts, &b)
+ if size = try_constant(expr, prelude, opts, &b)
$defs.push(format("-DSIZEOF_%s=%s", type.tr_cpp, size))
size
end