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
2 changes: 1 addition & 1 deletion lib/ffi_generator/generators/from_c_generator/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def read_macro_definition(declaration_cursor, name)
def resolve_type(full_type, is_array = false)
canonical_type = full_type.canonical
data_array = case canonical_type.kind
when :void, :bool, :u_char, :u_short, :u_int, :u_long, :u_long_long, :char_s, :s_char, :short, :int, :long, :long_long, :float, :double
when :void, :bool, :u_char, :u_short, :u_int, :u_long, :u_long_long, :char_s, :s_char, :short, :int, :long, :long_long, :float, :double, :long_double
PrimitiveType.new(canonical_type.kind)
when :pointer
if is_array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def ruby_name
"Boolean"
when :u_char, :u_short, :u_int, :u_long, :u_long_long, :char_s, :s_char, :short, :int, :long, :long_long
"Integer"
when :float, :double
when :float, :double, :long_double
"Float"
end
end
Expand All @@ -39,6 +39,7 @@ def ruby_ffi_type
when :long_long then ":long_long"
when :float then ":float"
when :double then ":double"
when :long_double then ":long_double"
end
end

Expand Down
Loading