    # File lib/ffi/struct.rb, line 184
          def layout(*spec)
    #        raise RuntimeError, "struct layout already defined for #{self.inspect}" if defined?(@layout)
            return @layout if spec.size == 0

            builder = StructLayoutBuilder.new
            builder.union = self < Union
            builder.packed = @packed if defined?(@packed)
            builder.alignment = @min_alignment if defined?(@min_alignment)

            if spec[0].kind_of?(Hash)
              hash_layout(builder, spec)
            else
              array_layout(builder, spec)
            end
            builder.size = @size if defined?(@size) && @size > builder.size
            cspec = builder.build
            @layout = cspec unless self == Struct
            @size = cspec.size
            return cspec
          end