    # File lib/ffi/tools/struct_generator.rb, line 131
        def generate_layout
          buf = ""

          @fields.each_with_index do |field, i|
            if buf.empty?
              buf << "layout :#{field.name}, :#{field.type}, #{field.offset}"
            else
              buf << "       :#{field.name}, :#{field.type}, #{field.offset}"
            end

            if i < @fields.length - 1
              buf << ",\n"
            end
          end

          buf
        end