ffi 1.17.0.rc2-java → 1.17.2-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 +24 -0
- data/Gemfile +4 -2
- data/Rakefile +2 -2
- data/lib/ffi/autopointer.rb +1 -9
- data/lib/ffi/ffi.rb +59 -0
- data/lib/ffi/version.rb +1 -1
- data/sig/ffi/abstract_memory.rbs +1 -0
- data/sig/ffi/auto_pointer.rbs +0 -1
- data/sig/ffi/library.rbs +1 -1
- data.tar.gz.sig +5 -2
- metadata +14 -14
- 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: 7478a6ca7d9844364e8f2f4eab4ccd0c4fa0e5f8faa18079e5f69b2112a7d62c
|
4
|
+
data.tar.gz: 4a2636e7e4e1c524308d482c324386b515c6c84f5d6495f40bd96e5f9dd36aa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ea2a2a6ca08fde681e33f5fad9a2154f5e8191128ea69cab2313100fa2e445396494e896c7ba507b372840d3b873e0850e4fa590893b2128dccfe1d7571c49b
|
7
|
+
data.tar.gz: b691234fd30347f6bb6366943835351c29f4d74cf33edbb5f10db5f4c4d89fb568949953433ff31baea9818b2abd9445092e4c341ebae732575623b8492808aa
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
1.17.2 / 2025-04-15
|
2
|
+
-------------------
|
3
|
+
|
4
|
+
Fixed:
|
5
|
+
* #1144, #1145 Update libffi to 3.4.8 to fix installation issues on latest Macos on ARM64
|
6
|
+
* Various adjustments to run the specs cleanly on Ruby-3.5 master branch.
|
7
|
+
|
8
|
+
|
9
|
+
1.17.1 / 2024-12-30
|
10
|
+
-------------------
|
11
|
+
|
12
|
+
Fixed:
|
13
|
+
* #1117 Restart async callback dispatcher thread after fork.
|
14
|
+
* #1133 Add ruby-3.4 native gem.
|
15
|
+
* #1134 Fix FFI::DataConverter non-generic usage in RBS files.
|
16
|
+
|
17
|
+
|
18
|
+
1.17.0 / 2024-06-02
|
19
|
+
-------------------
|
20
|
+
|
21
|
+
Fixed:
|
22
|
+
* Add FFI::AbstractMemory#read_array_of_string . It was defined but not exposed to Ruby nor tested. #1070
|
23
|
+
|
24
|
+
|
1
25
|
1.17.0.rc2 / 2024-04-22
|
2
26
|
-------------------
|
3
27
|
|
data/Gemfile
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
group :development do
|
4
|
-
gem '
|
4
|
+
gem 'benchmark' # necessary on ruby-3.5+
|
5
|
+
gem 'bigdecimal' # necessary on ruby-3.3+
|
5
6
|
gem 'bundler', '>= 1.16', '< 3'
|
7
|
+
gem 'fiddle', platforms: %i[mri windows] # necessary on ruby-3.5+
|
6
8
|
gem 'rake', '~> 13.0'
|
7
9
|
gem 'rake-compiler', '~> 1.1'
|
8
|
-
gem 'rake-compiler-dock', '~> 1.0
|
10
|
+
gem 'rake-compiler-dock', '~> 1.9.0'
|
9
11
|
gem 'rspec', '~> 3.0'
|
10
12
|
end
|
11
13
|
|
data/Rakefile
CHANGED
@@ -136,9 +136,9 @@ namespace "gem" do
|
|
136
136
|
desc "Build the native gem for #{plat}"
|
137
137
|
task plat => ['prepare', 'build'] do
|
138
138
|
RakeCompilerDock.sh <<-EOT, platform: plat
|
139
|
-
|
139
|
+
sudo apt-get update && sudo apt-get install -y libltdl-dev &&
|
140
140
|
bundle --local &&
|
141
|
-
rake native:#{plat} pkg/#{gem_spec.full_name}-#{plat}.gem MAKE='nice make -j`nproc`' RUBY_CC_VERSION
|
141
|
+
rake native:#{plat} pkg/#{gem_spec.full_name}-#{plat}.gem MAKE='nice make -j`nproc`' RUBY_CC_VERSION=#{RakeCompilerDock.ruby_cc_version("~>2.5", "~>3.0")}
|
142
142
|
EOT
|
143
143
|
end
|
144
144
|
end
|
data/lib/ffi/autopointer.rb
CHANGED
@@ -45,14 +45,6 @@ module FFI
|
|
45
45
|
# @note WARNING: passing a proc _may_ cause your pointer to never be
|
46
46
|
# GC'd, unless you're careful to avoid trapping a reference to the
|
47
47
|
# pointer in the proc. See the test specs for examples.
|
48
|
-
# @overload initialize(pointer) { |p| ... }
|
49
|
-
# @param pointer [Pointer]
|
50
|
-
# @yieldparam [Pointer] p +pointer+ passed to the block
|
51
|
-
# @return [self]
|
52
|
-
# The passed block will be invoked at GC time.
|
53
|
-
# @note
|
54
|
-
# WARNING: passing a block will cause your pointer to never be GC'd.
|
55
|
-
# This is bad.
|
56
48
|
# @overload initialize(pointer)
|
57
49
|
# @param pointer [Pointer]
|
58
50
|
# @return [self]
|
@@ -75,7 +67,7 @@ module FFI
|
|
75
67
|
# The last calling idiom (only one parameter) is generally only
|
76
68
|
# going to be useful if you subclass {AutoPointer}, and override
|
77
69
|
# #release, which by default does nothing.
|
78
|
-
def initialize(ptr, proc=nil
|
70
|
+
def initialize(ptr, proc=nil)
|
79
71
|
raise TypeError, "Invalid pointer" if ptr.nil? || !ptr.kind_of?(Pointer) ||
|
80
72
|
ptr.kind_of?(MemoryPointer) || ptr.kind_of?(AutoPointer)
|
81
73
|
super(ptr.type_size, ptr)
|
data/lib/ffi/ffi.rb
CHANGED
@@ -48,3 +48,62 @@ require 'ffi/variadic'
|
|
48
48
|
require 'ffi/enum'
|
49
49
|
require 'ffi/version'
|
50
50
|
require 'ffi/function'
|
51
|
+
|
52
|
+
module FFI
|
53
|
+
module ModernForkTracking
|
54
|
+
def _fork
|
55
|
+
pid = super
|
56
|
+
if pid == 0
|
57
|
+
FFI._async_cb_dispatcher_atfork_child
|
58
|
+
end
|
59
|
+
pid
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
module LegacyForkTracking
|
64
|
+
module KernelExt
|
65
|
+
def fork
|
66
|
+
if block_given?
|
67
|
+
super do
|
68
|
+
FFI._async_cb_dispatcher_atfork_child
|
69
|
+
yield
|
70
|
+
end
|
71
|
+
else
|
72
|
+
pid = super
|
73
|
+
FFI._async_cb_dispatcher_atfork_child if pid.nil?
|
74
|
+
pid
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
module KernelExtPrivate
|
80
|
+
include KernelExt
|
81
|
+
private :fork
|
82
|
+
end
|
83
|
+
|
84
|
+
module IOExt
|
85
|
+
def popen(*args)
|
86
|
+
return super unless args[0] == '-'
|
87
|
+
|
88
|
+
super(*args) do |pipe|
|
89
|
+
FFI._async_cb_dispatcher_atfork_child if pipe.nil?
|
90
|
+
yield pipe
|
91
|
+
end
|
92
|
+
end
|
93
|
+
ruby2_keywords :popen if respond_to?(:ruby2_keywords)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
if Process.respond_to?(:_fork)
|
98
|
+
# The nice Ruby 3.1+ way of doing things
|
99
|
+
::Process.singleton_class.prepend(ModernForkTracking)
|
100
|
+
elsif Process.respond_to?(:fork)
|
101
|
+
# Barf. Old CRuby.
|
102
|
+
# Most of the inspiration for how to do this was stolen from ActiveSupport.
|
103
|
+
::Object.prepend(LegacyForkTracking::KernelExtPrivate)
|
104
|
+
::Object.singleton_class.prepend(LegacyForkTracking::KernelExt)
|
105
|
+
::Kernel.prepend(LegacyForkTracking::KernelExtPrivate)
|
106
|
+
::Kernel.singleton_class.prepend(LegacyForkTracking::KernelExt)
|
107
|
+
::IO.singleton_class.prepend(LegacyForkTracking::IOExt)
|
108
|
+
end
|
109
|
+
end
|
data/lib/ffi/version.rb
CHANGED
data/sig/ffi/abstract_memory.rbs
CHANGED
@@ -144,6 +144,7 @@ module FFI
|
|
144
144
|
def read_array_of_float: (Integer length) -> Array[Float]
|
145
145
|
def read_array_of_double: (Integer length) -> Array[Float]
|
146
146
|
def read_array_of_pointer: (Integer length) -> Array[Pointer]
|
147
|
+
def read_array_of_string: (?Integer? count) -> Array[String?]
|
147
148
|
|
148
149
|
def write_array_of_int8: (Array[int] ary) -> self
|
149
150
|
def write_array_of_int16: (Array[int] ary) -> self
|
data/sig/ffi/auto_pointer.rbs
CHANGED
@@ -13,7 +13,6 @@ module FFI
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def initialize: (Pointer pointer, Method | ^(self) -> void | Releaser::_Proc[self] callable) -> self
|
16
|
-
# | (Pointer pointer) { (self) -> void } -> self # https://github.com/ffi/ffi/issues/1071
|
17
16
|
| (Pointer pointer) -> self # where class < `def self.release: (instance pointer) -> void`
|
18
17
|
|
19
18
|
extend DataConverter[Pointer, instance, nil]
|
data/sig/ffi/library.rbs
CHANGED
@@ -33,7 +33,7 @@ module FFI
|
|
33
33
|
def find_type: (ffi_lib_type t) -> Type
|
34
34
|
def freeze: () -> void
|
35
35
|
def function_names: (_ToS name, Array[Type | singleton(Struct)] arg_types) -> Array[String]
|
36
|
-
def typedef: [T < Type] (T old, Symbol | DataConverter add, ?untyped) -> T
|
36
|
+
def typedef: [T < Type, N, R, C] (T old, Symbol | DataConverter[N, R, C] add, ?untyped) -> T
|
37
37
|
| (Symbol old, Symbol add, ?untyped) -> (Type | Enum)
|
38
38
|
| [X < DataConverter[N, R, C], N, R, C] (X old, Symbol add, ?untyped) -> Type::Mapped[X, N, R, C]
|
39
39
|
| (:enum old, Array[Symbol | Integer] add, ?untyped) -> Enum
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
N��m(R�������~P��[V��X+yf1C��`�%k��1�+d�%%�@�W�4�8"M���z�C/�"K\���<w/��9���9r�5N]��X���y=\�I��8�-e��N�1�
|
2
|
+
|
3
|
+
=#�y:��O���D�ZbyT�I�Lt³�&�*���~#����mD�V��Yk��XfZ��0=��ܙ�U]��
|
4
|
+
[a2��n��Jj��P@~��Un5���g�T�(b^�Aw��Ѧu����ٴ
|
5
|
+
PHE�76�P���l��b�5j�m�n����[%���z�����& ����]��Ŝ�ҟOI�֮�0=
|
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.17.
|
4
|
+
version: 1.17.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Wayne Meissner
|
@@ -10,8 +10,8 @@ cert_chain:
|
|
10
10
|
- |
|
11
11
|
-----BEGIN CERTIFICATE-----
|
12
12
|
MIIEBDCCAmygAwIBAgIBAzANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
|
13
|
-
|
14
|
-
|
13
|
+
L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNDEyMjkxOTU2NTZaFw0yNTEy
|
14
|
+
MjkxOTU2NTZaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
|
15
15
|
PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
|
16
16
|
mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
|
17
17
|
eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
|
@@ -22,17 +22,17 @@ cert_chain:
|
|
22
22
|
chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
|
23
23
|
9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjOTA3MAkG
|
24
24
|
A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ4h1tIyvdUWtMI739xMzTR
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEAoZZWzNV2XXaoSmvyamSSN+Wt/Ia+DNrU
|
26
|
+
2pc3kMEqykH6l1WiVPszr6HavQ//2I2UcSRSS5AGDdiSXcfyFmHtMBdtJHhTPcn7
|
27
|
+
4DLliB0szpvwG+ltGD8PI8eWkLaTQeFzs+0QCTavgKV+Zw56Q0J5zZvHHUMrLkUD
|
28
|
+
qhwKjdTdkrRTn9Sqi0BrIRRZGTUDdrt8qoWm35aES5arKZzytgrRD/kXfFW2LCg0
|
29
|
+
FzgTKibR4/3g8ph94kQLg/D2SMlVPkQ3ECi036mZxDC2n8V6u3rDkG5923wmrRZB
|
30
|
+
J6cqz475Q8HYORQCB68OPzkWMfC7mBo3vpSsIqRoNs1FE4FJu4FGwZG8fBSrDC4H
|
31
|
+
bZe+GtyS3e2SMjgT65zp35gLO9I7MquzYN9P6V2u1iBpTycchk5z9R1ghxzZSBT8
|
32
|
+
DrkJ9tVlPQtJB0LqT0tvBap4upnwT1xYq721b5dwH6AF4Pi6iz/dc5vnq1/MH8bV
|
33
|
+
8VbbBzzeE7MsvgkP3sHlLmY8PtuyViJ8
|
34
34
|
-----END CERTIFICATE-----
|
35
|
-
date:
|
35
|
+
date: 2025-04-15 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rake
|
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
247
247
|
- !ruby/object:Gem::Version
|
248
248
|
version: '0'
|
249
249
|
requirements: []
|
250
|
-
rubygems_version: 3.6.
|
250
|
+
rubygems_version: 3.6.2
|
251
251
|
specification_version: 4
|
252
252
|
summary: Ruby FFI
|
253
253
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|