ffi 1.15.4-x64-mingw32 → 1.16.0-x64-mingw32

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.
data/lib/ffi/variadic.rb CHANGED
@@ -54,16 +54,27 @@ module FFI
54
54
  invoker = self
55
55
  params = "*args"
56
56
  call = "call"
57
- mod.module_eval <<-code
58
- @@#{mname} = invoker
59
- def self.#{mname}(#{params})
60
- @@#{mname}.#{call}(#{params})
61
- end
62
- def #{mname}(#{params})
63
- @@#{mname}.#{call}(#{params})
64
- end
57
+ mname = mname.to_sym
58
+ mod.module_eval <<-code, __FILE__, __LINE__
59
+ @ffi_functions = {} unless defined?(@ffi_functions)
60
+ @ffi_functions[#{mname.inspect}] = invoker
61
+
62
+ def self.#{mname}(#{params})
63
+ @ffi_functions[#{mname.inspect}].#{call}(#{params})
64
+ end
65
+
66
+ define_method(#{mname.inspect}, &method(#{mname.inspect}))
65
67
  code
66
68
  invoker
67
69
  end
70
+
71
+ # Retrieve Array of parameter types
72
+ #
73
+ # This method returns an Array of FFI types accepted as function parameters.
74
+ #
75
+ # @return [Array<FFI::Type>]
76
+ def param_types
77
+ [*@fixed, Type::Builtin::VARARGS]
78
+ end
68
79
  end
69
80
  end
data/lib/ffi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FFI
2
- VERSION = '1.15.4'
2
+ VERSION = '1.16.0'
3
3
  end
@@ -13,7 +13,7 @@ class FfiGemHelper < Bundler::GemHelper
13
13
  update_history
14
14
  end
15
15
 
16
- task "release:rubygem_push" => ["gem:windows", "gem:java"]
16
+ task "release:rubygem_push" => ["gem:native", "gem:java"]
17
17
  end
18
18
 
19
19
  def hfile
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.4
4
+ version: 1.16.0
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Wayne Meissner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-01 00:00:00.000000000 Z
11
+ date: 2023-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '1.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.0'
40
+ version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake-compiler-dock
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -80,8 +80,6 @@ files:
80
80
  - README.md
81
81
  - Rakefile
82
82
  - ffi.gemspec
83
- - lib/2.3/ffi_c.so
84
- - lib/2.4/ffi_c.so
85
83
  - lib/2.5/ffi_c.so
86
84
  - lib/2.6/ffi_c.so
87
85
  - lib/2.7/ffi_c.so
@@ -91,12 +89,16 @@ files:
91
89
  - lib/ffi/autopointer.rb
92
90
  - lib/ffi/buffer.rb
93
91
  - lib/ffi/callback.rb
92
+ - lib/ffi/compat.rb
94
93
  - lib/ffi/data_converter.rb
94
+ - lib/ffi/dynamic_library.rb
95
95
  - lib/ffi/enum.rb
96
96
  - lib/ffi/errno.rb
97
97
  - lib/ffi/ffi.rb
98
+ - lib/ffi/function.rb
98
99
  - lib/ffi/io.rb
99
100
  - lib/ffi/library.rb
101
+ - lib/ffi/library_path.rb
100
102
  - lib/ffi/managedstruct.rb
101
103
  - lib/ffi/memorypointer.rb
102
104
  - lib/ffi/platform.rb
@@ -105,9 +107,12 @@ files:
105
107
  - lib/ffi/platform/aarch64-freebsd12/types.conf
106
108
  - lib/ffi/platform/aarch64-linux/types.conf
107
109
  - lib/ffi/platform/aarch64-openbsd/types.conf
110
+ - lib/ffi/platform/aarch64-windows/types.conf
108
111
  - lib/ffi/platform/arm-freebsd/types.conf
109
112
  - lib/ffi/platform/arm-freebsd12/types.conf
110
113
  - lib/ffi/platform/arm-linux/types.conf
114
+ - lib/ffi/platform/hppa1.1-linux/types.conf
115
+ - lib/ffi/platform/hppa2.0-linux/types.conf
111
116
  - lib/ffi/platform/i386-cygwin/types.conf
112
117
  - lib/ffi/platform/i386-darwin/types.conf
113
118
  - lib/ffi/platform/i386-freebsd/types.conf
@@ -119,6 +124,7 @@ files:
119
124
  - lib/ffi/platform/i386-solaris/types.conf
120
125
  - lib/ffi/platform/i386-windows/types.conf
121
126
  - lib/ffi/platform/ia64-linux/types.conf
127
+ - lib/ffi/platform/loongarch64-linux/types.conf
122
128
  - lib/ffi/platform/mips-linux/types.conf
123
129
  - lib/ffi/platform/mips64-linux/types.conf
124
130
  - lib/ffi/platform/mips64el-linux/types.conf
@@ -138,9 +144,10 @@ files:
138
144
  - lib/ffi/platform/s390x-linux/types.conf
139
145
  - lib/ffi/platform/sparc-linux/types.conf
140
146
  - lib/ffi/platform/sparc-solaris/types.conf
141
- - lib/ffi/platform/sparc64-linux/types.conf
147
+ - lib/ffi/platform/sparcv9-linux/types.conf
142
148
  - lib/ffi/platform/sparcv9-openbsd/types.conf
143
149
  - lib/ffi/platform/sparcv9-solaris/types.conf
150
+ - lib/ffi/platform/sw_64-linux/types.conf
144
151
  - lib/ffi/platform/x86_64-cygwin/types.conf
145
152
  - lib/ffi/platform/x86_64-darwin/types.conf
146
153
  - lib/ffi/platform/x86_64-dragonflybsd/types.conf
@@ -195,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
202
  requirements:
196
203
  - - ">="
197
204
  - !ruby/object:Gem::Version
198
- version: '2.3'
205
+ version: '2.5'
199
206
  - - "<"
200
207
  - !ruby/object:Gem::Version
201
208
  version: 3.1.dev
@@ -205,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
212
  - !ruby/object:Gem::Version
206
213
  version: '0'
207
214
  requirements: []
208
- rubygems_version: 3.2.3
215
+ rubygems_version: 3.3.26
209
216
  signing_key:
210
217
  specification_version: 4
211
218
  summary: Ruby FFI
data/lib/2.3/ffi_c.so DELETED
Binary file
data/lib/2.4/ffi_c.so DELETED
Binary file