Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/ffi_generator/generators/from_c_generator/array_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ module FFIGenerate
class Generator
class ArrayType < Type

attr_reader :element_type
attr_reader :constant_size

def initialize(element_type, constant_size)
@element_type = element_type
@constant_size = constant_size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module FFIGenerate
class Generator
class ByValueType < Type

attr_reader :inner_type

def initialize(inner_type)
@inner_type = inner_type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module FFIGenerate
class Generator
class PrimitiveType < Type

attr_reader :clang_type

def initialize(clang_type)
@clang_type = clang_type
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ def write_ruby
@written = true
end

def struct?
!@is_union
end

def union?
@is_union
end

def ruby_name
@ruby_name ||= @name.to_ruby_classname
end
Expand Down