neelance / ffi_gen

A generator for Ruby FFI bindings, directly from header files via LLVM's Clang compiler
MIT License
88 stars 26 forks source link

java generator doesn't output struct member names #37

Open ghazel opened 9 years ago

ghazel commented 9 years ago

JNA struct members appear without names:

    public static class Blob extends Structure {
        public NativeLong ;
        public Pointer ;
    }

The code says:

        @fields.each do |field|
          writer.puts "public #{field[:type].java_jna_type} #{field[:symbol]};"
        end

I believe it should be something like:

        @fields.each do |field|
          writer.puts "public #{field[:type].java_jna_type} #{field[:name].raw};"
        end