ffi 1.17.0-x64-mingw32 → 1.17.2-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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6c62d8fa7a75216496c4934bf27ae94890df6634f88c1dadfd0b6d15f8ad958
4
- data.tar.gz: 4598e293c04c2ca9bafee32b466f972fde8b79da932c8c59a6c703710c232c16
3
+ metadata.gz: c10b468f0e285ea6f4cc361eac6d2372c90471579f9f8c1e342823fe18e14606
4
+ data.tar.gz: c3431a5b6ed6d95cabd5997724e3919c97a9d89c49009fcc4f1260454ebc33d2
5
5
  SHA512:
6
- metadata.gz: a3d8fce54c746d6265fef84040fa2835c8d490c125e99b55af011a90df1fcf6dbe09024982da91ba836d99302cceb48fa57efd951b5d7ed6768d97111c754386
7
- data.tar.gz: 9fab75642115fc45915da9e7e7de4998642bfd63a299108525c5e390b4905863675ed096266349aab11b83256779d541f998320ad74aaade3ceb389ef67140a7
6
+ metadata.gz: dc6c24110e4db4088b71ac609478c05ad533b1e4f1fb5931123f21288714e6214ec2452b36e26bc3310bdcf2f7edc7077c484772acd5c1bf559d7c8eb3df1640
7
+ data.tar.gz: b8ecf7760220128679c4ca941db45cb9fcf5329560ae996a07b4935148da0f3dfe18ebede63814583acf47eb381c8362d9079cd97184fd3b7606a21c96fb531d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
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
+
1
18
  1.17.0 / 2024-06-02
2
19
  -------------------
3
20
 
data/Gemfile CHANGED
@@ -1,11 +1,13 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  group :development do
4
+ gem 'benchmark' # necessary on ruby-3.5+
4
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.pre'
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
- #{ "sudo apt-get update && sudo apt-get install -y libltdl-dev &&" if plat !~ /linux/ }
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=${RUBY_CC_VERSION/:2.4.0/}
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/2.5/ffi_c.so CHANGED
Binary file
data/lib/2.6/ffi_c.so CHANGED
Binary file
data/lib/2.7/ffi_c.so CHANGED
Binary file
data/lib/3.0/ffi_c.so CHANGED
Binary file
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
@@ -1,3 +1,3 @@
1
1
  module FFI
2
- VERSION = '1.17.0'
2
+ VERSION = '1.17.2'
3
3
  end
@@ -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
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.17.2
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Wayne Meissner
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-06-02 00:00:00.000000000 Z
10
+ date: 2025-04-15 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake
@@ -211,7 +210,6 @@ metadata:
211
210
  wiki_uri: https://github.com/ffi/ffi/wiki
212
211
  source_code_uri: https://github.com/ffi/ffi/
213
212
  mailing_list_uri: http://groups.google.com/group/ruby-ffi
214
- post_install_message:
215
213
  rdoc_options:
216
214
  - "--exclude=ext/ffi_c/.*\\.o$"
217
215
  - "--exclude=ffi_c\\.(bundle|so)$"
@@ -231,8 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
231
229
  - !ruby/object:Gem::Version
232
230
  version: '0'
233
231
  requirements: []
234
- rubygems_version: 3.3.26
235
- signing_key:
232
+ rubygems_version: 3.6.2
236
233
  specification_version: 4
237
234
  summary: Ruby FFI
238
235
  test_files: []