ffi 1.15.5-x64-mingw-ucrt → 1.16.0-x64-mingw-ucrt
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
- data/CHANGELOG.md +54 -0
- data/Gemfile +1 -1
- data/README.md +3 -2
- data/Rakefile +10 -7
- data/ffi.gemspec +2 -2
- data/lib/3.1/ffi_c.so +0 -0
- data/lib/3.2/ffi_c.so +0 -0
- data/lib/ffi/autopointer.rb +7 -22
- data/lib/ffi/compat.rb +43 -0
- data/lib/ffi/data_converter.rb +2 -2
- data/lib/ffi/dynamic_library.rb +89 -0
- data/lib/ffi/enum.rb +18 -11
- data/lib/ffi/ffi.rb +3 -0
- data/lib/ffi/function.rb +71 -0
- data/lib/ffi/library.rb +55 -71
- data/lib/ffi/library_path.rb +109 -0
- data/lib/ffi/managedstruct.rb +1 -1
- data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
- data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
- data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
- data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
- data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
- data/lib/ffi/platform.rb +15 -13
- data/lib/ffi/struct.rb +2 -1
- data/lib/ffi/struct_layout.rb +1 -1
- data/lib/ffi/struct_layout_builder.rb +1 -1
- data/lib/ffi/types.rb +30 -5
- data/lib/ffi/variadic.rb +19 -8
- data/lib/ffi/version.rb +1 -1
- metadata +21 -11
- /data/lib/ffi/platform/{sparc64-linux → sparcv9-linux}/types.conf +0 -0
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
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
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
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.
|
4
|
+
version: 1.16.0
|
5
5
|
platform: x64-mingw-ucrt
|
6
6
|
authors:
|
7
7
|
- Wayne Meissner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
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.
|
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.
|
40
|
+
version: '1.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake-compiler-dock
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,17 +81,22 @@ files:
|
|
81
81
|
- Rakefile
|
82
82
|
- ffi.gemspec
|
83
83
|
- lib/3.1/ffi_c.so
|
84
|
+
- lib/3.2/ffi_c.so
|
84
85
|
- lib/ffi.rb
|
85
86
|
- lib/ffi/abstract_memory.rb
|
86
87
|
- lib/ffi/autopointer.rb
|
87
88
|
- lib/ffi/buffer.rb
|
88
89
|
- lib/ffi/callback.rb
|
90
|
+
- lib/ffi/compat.rb
|
89
91
|
- lib/ffi/data_converter.rb
|
92
|
+
- lib/ffi/dynamic_library.rb
|
90
93
|
- lib/ffi/enum.rb
|
91
94
|
- lib/ffi/errno.rb
|
92
95
|
- lib/ffi/ffi.rb
|
96
|
+
- lib/ffi/function.rb
|
93
97
|
- lib/ffi/io.rb
|
94
98
|
- lib/ffi/library.rb
|
99
|
+
- lib/ffi/library_path.rb
|
95
100
|
- lib/ffi/managedstruct.rb
|
96
101
|
- lib/ffi/memorypointer.rb
|
97
102
|
- lib/ffi/platform.rb
|
@@ -100,9 +105,12 @@ files:
|
|
100
105
|
- lib/ffi/platform/aarch64-freebsd12/types.conf
|
101
106
|
- lib/ffi/platform/aarch64-linux/types.conf
|
102
107
|
- lib/ffi/platform/aarch64-openbsd/types.conf
|
108
|
+
- lib/ffi/platform/aarch64-windows/types.conf
|
103
109
|
- lib/ffi/platform/arm-freebsd/types.conf
|
104
110
|
- lib/ffi/platform/arm-freebsd12/types.conf
|
105
111
|
- lib/ffi/platform/arm-linux/types.conf
|
112
|
+
- lib/ffi/platform/hppa1.1-linux/types.conf
|
113
|
+
- lib/ffi/platform/hppa2.0-linux/types.conf
|
106
114
|
- lib/ffi/platform/i386-cygwin/types.conf
|
107
115
|
- lib/ffi/platform/i386-darwin/types.conf
|
108
116
|
- lib/ffi/platform/i386-freebsd/types.conf
|
@@ -114,6 +122,7 @@ files:
|
|
114
122
|
- lib/ffi/platform/i386-solaris/types.conf
|
115
123
|
- lib/ffi/platform/i386-windows/types.conf
|
116
124
|
- lib/ffi/platform/ia64-linux/types.conf
|
125
|
+
- lib/ffi/platform/loongarch64-linux/types.conf
|
117
126
|
- lib/ffi/platform/mips-linux/types.conf
|
118
127
|
- lib/ffi/platform/mips64-linux/types.conf
|
119
128
|
- lib/ffi/platform/mips64el-linux/types.conf
|
@@ -133,9 +142,10 @@ files:
|
|
133
142
|
- lib/ffi/platform/s390x-linux/types.conf
|
134
143
|
- lib/ffi/platform/sparc-linux/types.conf
|
135
144
|
- lib/ffi/platform/sparc-solaris/types.conf
|
136
|
-
- lib/ffi/platform/
|
145
|
+
- lib/ffi/platform/sparcv9-linux/types.conf
|
137
146
|
- lib/ffi/platform/sparcv9-openbsd/types.conf
|
138
147
|
- lib/ffi/platform/sparcv9-solaris/types.conf
|
148
|
+
- lib/ffi/platform/sw_64-linux/types.conf
|
139
149
|
- lib/ffi/platform/x86_64-cygwin/types.conf
|
140
150
|
- lib/ffi/platform/x86_64-darwin/types.conf
|
141
151
|
- lib/ffi/platform/x86_64-dragonflybsd/types.conf
|
@@ -180,7 +190,7 @@ metadata:
|
|
180
190
|
wiki_uri: https://github.com/ffi/ffi/wiki
|
181
191
|
source_code_uri: https://github.com/ffi/ffi/
|
182
192
|
mailing_list_uri: http://groups.google.com/group/ruby-ffi
|
183
|
-
post_install_message:
|
193
|
+
post_install_message:
|
184
194
|
rdoc_options:
|
185
195
|
- "--exclude=ext/ffi_c/.*\\.o$"
|
186
196
|
- "--exclude=ffi_c\\.(bundle|so)$"
|
@@ -190,18 +200,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
200
|
requirements:
|
191
201
|
- - ">="
|
192
202
|
- !ruby/object:Gem::Version
|
193
|
-
version: '
|
203
|
+
version: '3.1'
|
194
204
|
- - "<"
|
195
205
|
- !ruby/object:Gem::Version
|
196
|
-
version: 3.
|
206
|
+
version: 3.3.dev
|
197
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
198
208
|
requirements:
|
199
209
|
- - ">="
|
200
210
|
- !ruby/object:Gem::Version
|
201
211
|
version: '0'
|
202
212
|
requirements: []
|
203
|
-
rubygems_version: 3.3.
|
204
|
-
signing_key:
|
213
|
+
rubygems_version: 3.3.26
|
214
|
+
signing_key:
|
205
215
|
specification_version: 4
|
206
216
|
summary: Ruby FFI
|
207
217
|
test_files: []
|
File without changes
|