ffi 1.15.2-java → 1.15.5-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - checksums.yaml.gz.sig +0 -0
 - data/CHANGELOG.md +32 -0
 - data/Rakefile +21 -7
 - data/ffi.gemspec +0 -1
 - data/lib/ffi/library.rb +1 -1
 - data/lib/ffi/tools/const_generator.rb +5 -4
 - data/lib/ffi/version.rb +1 -1
 - data/lib/ffi.rb +1 -1
 - data/rakelib/ffi_gem_helper.rb +1 -1
 - data.tar.gz.sig +0 -0
 - metadata +3 -17
 - metadata.gz.sig +0 -0
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 676f149387269ce0baf987cb6101478492bb971910a93861cf3cdbed2ac978db
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: e4eea63d3de948f435d82eadd6a493d116aa745e540506cb7f2e26bce138bd0b
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: fff07a6b0a336cfca00b4f9bbcb06eee66fa693f0e4ebaa0fd4aa4dccc16c9f8ddb0fa833912071d395d187e4d6a41986d875768dfc2416cac79591ec69e49ff
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5d62fd612add81282ccf5d1ff06ffc6acffcd8f397cb198f0ab8bba3214ff0bb0f89edbb6e398654af7d4447e810b069117d1c352bc021fbf2b318555fb83b25
         
     | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,35 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            1.15.5 / 2022-01-10
         
     | 
| 
      
 2 
     | 
    
         
            +
            -------------------
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            Fixed:
         
     | 
| 
      
 5 
     | 
    
         
            +
            * Fix long double argument or return values on 32bit i686. #849
         
     | 
| 
      
 6 
     | 
    
         
            +
            * FFI::ConstGenerator: avoid usage of the same binary file simultaneously. #929
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            Added:
         
     | 
| 
      
 9 
     | 
    
         
            +
            * Add Windows fat binary gem for Ruby-3.1
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            Removed:
         
     | 
| 
      
 12 
     | 
    
         
            +
            * Remove Windows fat binary gem for Ruby < 2.4
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            1.15.4 / 2021-09-01
         
     | 
| 
      
 16 
     | 
    
         
            +
            -------------------
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            Fixed:
         
     | 
| 
      
 19 
     | 
    
         
            +
            * Fix build for uClibc. #913
         
     | 
| 
      
 20 
     | 
    
         
            +
            * Correct module lookup when including `ffi-module` gem. #912
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
            Changed:
         
     | 
| 
      
 23 
     | 
    
         
            +
            * Use ruby code of the ffi gem in JRuby-9.2.20+. #915
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            1.15.3 / 2021-06-16
         
     | 
| 
      
 27 
     | 
    
         
            +
            -------------------
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            Fixed:
         
     | 
| 
      
 30 
     | 
    
         
            +
            * Fix temporary packaging issue with libffi. #904
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
       1 
33 
     | 
    
         
             
            1.15.2 / 2021-06-16
         
     | 
| 
       2 
34 
     | 
    
         
             
            -------------------
         
     | 
| 
       3 
35 
     | 
    
         | 
    
        data/Rakefile
    CHANGED
    
    | 
         @@ -18,7 +18,7 @@ RSpec::Core::RakeTask.new(:spec => :compile) do |config| 
     | 
|
| 
       18 
18 
     | 
    
         
             
            end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
            desc "Build all packages"
         
     | 
| 
       21 
     | 
    
         
            -
            task :package => %w[ gem:java gem: 
     | 
| 
      
 21 
     | 
    
         
            +
            task :package => %w[ gem:java gem:native ]
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
       23 
23 
     | 
    
         
             
            CLOBBER.include 'lib/ffi/types.conf'
         
     | 
| 
       24 
24 
     | 
    
         
             
            CLOBBER.include 'pkg'
         
     | 
| 
         @@ -86,7 +86,7 @@ task 'gem:java' => 'java:gem' 
     | 
|
| 
       86 
86 
     | 
    
         | 
| 
       87 
87 
     | 
    
         
             
            FfiGemHelper.install_tasks
         
     | 
| 
       88 
88 
     | 
    
         
             
            # Register windows gems to be pushed to rubygems.org
         
     | 
| 
       89 
     | 
    
         
            -
            Bundler::GemHelper.instance.cross_platforms = %w[x86-mingw32 x64-mingw32]
         
     | 
| 
      
 89 
     | 
    
         
            +
            Bundler::GemHelper.instance.cross_platforms = %w[x86-mingw32 x64-mingw-ucrt x64-mingw32]
         
     | 
| 
       90 
90 
     | 
    
         | 
| 
       91 
91 
     | 
    
         
             
            if RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
         
     | 
| 
       92 
92 
     | 
    
         
             
              require 'rake/extensiontask'
         
     | 
| 
         @@ -108,11 +108,25 @@ else 
     | 
|
| 
       108 
108 
     | 
    
         
             
            end
         
     | 
| 
       109 
109 
     | 
    
         | 
| 
       110 
110 
     | 
    
         | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
            task  
     | 
| 
       113 
     | 
    
         
            -
             
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
       115 
     | 
    
         
            -
               
     | 
| 
      
 111 
     | 
    
         
            +
            namespace "gem" do
         
     | 
| 
      
 112 
     | 
    
         
            +
              task 'prepare' do
         
     | 
| 
      
 113 
     | 
    
         
            +
                require 'rake_compiler_dock'
         
     | 
| 
      
 114 
     | 
    
         
            +
                sh "bundle package --all"
         
     | 
| 
      
 115 
     | 
    
         
            +
              end
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
              Bundler::GemHelper.instance.cross_platforms.each do |plat|
         
     | 
| 
      
 118 
     | 
    
         
            +
                desc "Build all native binary gems in parallel"
         
     | 
| 
      
 119 
     | 
    
         
            +
                multitask 'native' => plat
         
     | 
| 
      
 120 
     | 
    
         
            +
             
     | 
| 
      
 121 
     | 
    
         
            +
                desc "Build the native gem for #{plat}"
         
     | 
| 
      
 122 
     | 
    
         
            +
                task plat => ['prepare', 'build'] do
         
     | 
| 
      
 123 
     | 
    
         
            +
                  RakeCompilerDock.sh <<-EOT, platform: plat
         
     | 
| 
      
 124 
     | 
    
         
            +
                    sudo apt-get update &&
         
     | 
| 
      
 125 
     | 
    
         
            +
                    sudo apt-get install -y libltdl-dev && bundle --local &&
         
     | 
| 
      
 126 
     | 
    
         
            +
                    rake cross native gem MAKE='nice make -j`nproc`' RUBY_CC_VERSION=${RUBY_CC_VERSION/:2.2.2/}
         
     | 
| 
      
 127 
     | 
    
         
            +
                  EOT
         
     | 
| 
      
 128 
     | 
    
         
            +
                end
         
     | 
| 
      
 129 
     | 
    
         
            +
              end
         
     | 
| 
       116 
130 
     | 
    
         
             
            end
         
     | 
| 
       117 
131 
     | 
    
         | 
| 
       118 
132 
     | 
    
         
             
            directory "ext/ffi_c/libffi"
         
     | 
    
        data/ffi.gemspec
    CHANGED
    
    | 
         @@ -39,5 +39,4 @@ Gem::Specification.new do |s| 
     | 
|
| 
       39 
39 
     | 
    
         
             
              s.add_development_dependency 'rake-compiler', '~> 1.0'
         
     | 
| 
       40 
40 
     | 
    
         
             
              s.add_development_dependency 'rake-compiler-dock', '~> 1.0'
         
     | 
| 
       41 
41 
     | 
    
         
             
              s.add_development_dependency 'rspec', '~> 2.14.1'
         
     | 
| 
       42 
     | 
    
         
            -
              s.add_development_dependency 'rubygems-tasks', "~> 0.2.4"
         
     | 
| 
       43 
42 
     | 
    
         
             
            end
         
     | 
    
        data/lib/ffi/library.rb
    CHANGED
    
    | 
         @@ -84,7 +84,7 @@ module FFI 
     | 
|
| 
       84 
84 
     | 
    
         
             
                # @raise {RuntimeError} if +mod+ is not a Module
         
     | 
| 
       85 
85 
     | 
    
         
             
                # Test if extended object is a Module. If not, raise RuntimeError.
         
     | 
| 
       86 
86 
     | 
    
         
             
                def self.extended(mod)
         
     | 
| 
       87 
     | 
    
         
            -
                  raise RuntimeError.new("must only be extended by module") unless mod.kind_of?(Module)
         
     | 
| 
      
 87 
     | 
    
         
            +
                  raise RuntimeError.new("must only be extended by module") unless mod.kind_of?(::Module)
         
     | 
| 
       88 
88 
     | 
    
         
             
                end
         
     | 
| 
       89 
89 
     | 
    
         | 
| 
       90 
90 
     | 
    
         | 
| 
         @@ -105,9 +105,10 @@ module FFI 
     | 
|
| 
       105 
105 
     | 
    
         
             
                # @return [nil]
         
     | 
| 
       106 
106 
     | 
    
         
             
                # @raise if a constant is missing and +:required+ was set to +true+ (see {#initialize})
         
     | 
| 
       107 
107 
     | 
    
         
             
                def calculate(options = {})
         
     | 
| 
       108 
     | 
    
         
            -
                   
     | 
| 
      
 108 
     | 
    
         
            +
                  binary_path = nil
         
     | 
| 
       109 
109 
     | 
    
         | 
| 
       110 
110 
     | 
    
         
             
                  Tempfile.open("#{@prefix}.const_generator") do |f|
         
     | 
| 
      
 111 
     | 
    
         
            +
                    binary_path = f.path + ".bin"
         
     | 
| 
       111 
112 
     | 
    
         
             
                    @includes.each do |inc|
         
     | 
| 
       112 
113 
     | 
    
         
             
                      f.puts "#include <#{inc}>"
         
     | 
| 
       113 
114 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -125,7 +126,7 @@ module FFI 
     | 
|
| 
       125 
126 
     | 
    
         
             
                    f.flush
         
     | 
| 
       126 
127 
     | 
    
         | 
| 
       127 
128 
     | 
    
         
             
                    cc = ENV['CC'] || 'gcc'
         
     | 
| 
       128 
     | 
    
         
            -
                    output = `#{cc} #{options[:cppflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -x c -Wall -Werror #{f.path} -o #{ 
     | 
| 
      
 129 
     | 
    
         
            +
                    output = `#{cc} #{options[:cppflags]} -D_DARWIN_USE_64_BIT_INODE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -x c -Wall -Werror #{f.path} -o #{binary_path} 2>&1`
         
     | 
| 
       129 
130 
     | 
    
         | 
| 
       130 
131 
     | 
    
         
             
                    unless $?.success? then
         
     | 
| 
       131 
132 
     | 
    
         
             
                      output = output.split("\n").map { |l| "\t#{l}" }.join "\n"
         
     | 
| 
         @@ -133,8 +134,8 @@ module FFI 
     | 
|
| 
       133 
134 
     | 
    
         
             
                    end
         
     | 
| 
       134 
135 
     | 
    
         
             
                  end
         
     | 
| 
       135 
136 
     | 
    
         | 
| 
       136 
     | 
    
         
            -
                  output = `#{ 
     | 
| 
       137 
     | 
    
         
            -
                  File.unlink( 
     | 
| 
      
 137 
     | 
    
         
            +
                  output = `#{binary_path}`
         
     | 
| 
      
 138 
     | 
    
         
            +
                  File.unlink(binary_path + (FFI::Platform.windows? ? ".exe" : ""))
         
     | 
| 
       138 
139 
     | 
    
         
             
                  output.each_line do |line|
         
     | 
| 
       139 
140 
     | 
    
         
             
                    line =~ /^(\S+)\s(.*)$/
         
     | 
| 
       140 
141 
     | 
    
         
             
                    const = @constants[$1]
         
     | 
    
        data/lib/ffi/version.rb
    CHANGED
    
    
    
        data/lib/ffi.rb
    CHANGED
    
    | 
         @@ -7,7 +7,7 @@ if RUBY_ENGINE == 'ruby' 
     | 
|
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
              require 'ffi/ffi'
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
            elsif RUBY_ENGINE == 'jruby' && (RUBY_ENGINE_VERSION.split('.').map(&:to_i) <=> [9,  
     | 
| 
      
 10 
     | 
    
         
            +
            elsif RUBY_ENGINE == 'jruby' && (RUBY_ENGINE_VERSION.split('.').map(&:to_i) <=> [9, 2, 20]) >= 0
         
     | 
| 
       11 
11 
     | 
    
         
             
              JRuby::Util.load_ext("org.jruby.ext.ffi.FFIService")
         
     | 
| 
       12 
12 
     | 
    
         
             
              require 'ffi/ffi'
         
     | 
| 
       13 
13 
     | 
    
         | 
    
        data/rakelib/ffi_gem_helper.rb
    CHANGED
    
    
    
        data.tar.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ffi
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.15. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.15.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: java
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Wayne Meissner
         
     | 
| 
         @@ -29,7 +29,7 @@ cert_chain: 
     | 
|
| 
       29 
29 
     | 
    
         
             
              NEF/4atY64rruzkyfxGEcrFFOHJIkWnWQjRGaiZdgULxf7ira2gEFvV/ZtamqJWF
         
     | 
| 
       30 
30 
     | 
    
         
             
              c+I=
         
     | 
| 
       31 
31 
     | 
    
         
             
              -----END CERTIFICATE-----
         
     | 
| 
       32 
     | 
    
         
            -
            date:  
     | 
| 
      
 32 
     | 
    
         
            +
            date: 2022-01-10 00:00:00.000000000 Z
         
     | 
| 
       33 
33 
     | 
    
         
             
            dependencies:
         
     | 
| 
       34 
34 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       35 
35 
     | 
    
         
             
              name: rake
         
     | 
| 
         @@ -87,20 +87,6 @@ dependencies: 
     | 
|
| 
       87 
87 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       88 
88 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       89 
89 
     | 
    
         
             
                    version: 2.14.1
         
     | 
| 
       90 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       91 
     | 
    
         
            -
              name: rubygems-tasks
         
     | 
| 
       92 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       93 
     | 
    
         
            -
                requirements:
         
     | 
| 
       94 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       95 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       96 
     | 
    
         
            -
                    version: 0.2.4
         
     | 
| 
       97 
     | 
    
         
            -
              type: :development
         
     | 
| 
       98 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       99 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       100 
     | 
    
         
            -
                requirements:
         
     | 
| 
       101 
     | 
    
         
            -
                - - "~>"
         
     | 
| 
       102 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       103 
     | 
    
         
            -
                    version: 0.2.4
         
     | 
| 
       104 
90 
     | 
    
         
             
            description: Ruby FFI library
         
     | 
| 
       105 
91 
     | 
    
         
             
            email: wmeissner@gmail.com
         
     | 
| 
       106 
92 
     | 
    
         
             
            executables: []
         
     | 
| 
         @@ -231,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       231 
217 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       232 
218 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       233 
219 
     | 
    
         
             
            requirements: []
         
     | 
| 
       234 
     | 
    
         
            -
            rubygems_version: 3. 
     | 
| 
      
 220 
     | 
    
         
            +
            rubygems_version: 3.3.3
         
     | 
| 
       235 
221 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       236 
222 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       237 
223 
     | 
    
         
             
            summary: Ruby FFI
         
     | 
    
        metadata.gz.sig
    CHANGED
    
    | 
         Binary file 
     |