size(types)
Returns the size needed for the union with the given types.
Fiddle::CUnionEntity.size( [ Fiddle::TYPE_DOUBLE, Fiddle::TYPE_INT, Fiddle::TYPE_CHAR, Fiddle::TYPE_VOIDP ]) #=> 8
# File ext/fiddle/lib/fiddle/struct.rb, line 229 def CUnionEntity.size(types) types.map { |type, count = 1| PackInfo::SIZE_MAP[type] * count }.max end