Sha256: d5fb4f4c221c5d27f0f04f630b382c9e84944b76c076ab5d5d900eb97b9b5fd9

Contents?: true

Size: 287 Bytes

Versions: 22

Compression:

Stored size: 287 Bytes

Contents

# frozen_string_literal: true

module GirFFI
  # Generates a sequence of unique variable names used in generating
  # function definitions.
  class VariableNameGenerator
    def initialize
      @varno = 0
    end

    def new_var
      @varno += 1
      "_v#{@varno}"
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
gir_ffi-0.17.0 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.16.1 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.16.0 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.9 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.8 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.7 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.6 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.5 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.4 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.3 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.2 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.1 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.15.0 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.14.1 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.14.0 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.13.1 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.13.0 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.12.1 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.12.0 lib/gir_ffi/variable_name_generator.rb
gir_ffi-0.11.4 lib/gir_ffi/variable_name_generator.rb