mirror of
https://github.com/ruby/ruby.git
synced 2026-10-28 16:36:20 +08:00
Add rb_len_t to RbConfig::SIZEOF
An extconf.rb can then tell whether `rb_len_t` exists and how wide it is without compiling a probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5039d25b5a
commit
a9b49e4616
2 files changed
+6
Notes:
git
2026-10-09 05:02:01 +00:00
No files matched your search
@@ -32,5 +32,6 @@ have_type('_Decimal128') # x86_64 ABI
|
||||
have_type('__m64') # x86_64 ABI (optional)
|
||||
have_type('__m128') # x86_64 ABI (optional)
|
||||
have_type('__float80') # gcc x86
|
||||
have_type('rb_len_t')
|
||||
|
||||
create_makefile('rbconfig/sizeof')
|
||||
@@ -52,6 +52,11 @@ class TestRbConfig < Test::Unit::TestCase
|
||||
end
|
||||
end
|
||||
|
||||
def test_sizeof_rb_len_t
|
||||
require 'rbconfig/sizeof'
|
||||
assert_include([RbConfig::SIZEOF["long"], RbConfig::SIZEOF["void*"]], RbConfig::SIZEOF["rb_len_t"])
|
||||
end
|
||||
|
||||
def test_limits_and_sizeof_access_in_ractor
|
||||
assert_separately(["-W0"], <<~'RUBY')
|
||||
r = Ractor.new do
|
||||
|
||||
Reference in new issue
Block a user