Skip to content

Commit

Permalink
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/ruby/stdlib/rbconfig/sizeof.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# RbConfig::SIZEOF, implemented in terms of FFI
require 'ffi'

module RbConfig
sizeof = {}
FFI::TypeDefs.each {|k, v| sizeof[k.to_s] = v.size}
SIZEOF = sizeof
end

0 comments on commit 4633080

Please sign in to comment.