ffi 1.17.0-x64-mingw-ucrt → 1.17.1-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0604e88d730ee89b813cb8da1cf0b53e1686077176b14d06cd5a607f1e33833
4
- data.tar.gz: 64e9f7afeca0814f12aa512abf216117b3cef3cb689b4cfdec84f7a14531662e
3
+ metadata.gz: e7e78095ddc776bf7cca99812073993925103475bdc42f5f2d1239eddd4f3559
4
+ data.tar.gz: d3d063e4d24fa7a6e166e52d85f2f860b6c0c77a5468b57e16fdf5cbbb517cdf
5
5
  SHA512:
6
- metadata.gz: 72674230439f69fb2331e949c649c21cced040fe6637cd4814cdab9804cae1426f029d0f4edab2062a10897bbd68a2a24fefdc5d9d10560546dae823797ae25f
7
- data.tar.gz: c23827149eefeae9e17208f84d0591ff96a51c96ea19e1a033851a1734f6e21d0ba3de52cc2cd5380ccb1edfd46a2eb94f6fdce4fbb42e7babee2da1d64f4f16
6
+ metadata.gz: fe2e932470e344ac1d22d87c4c8132373bf300106e8e6184f91157ffd61ecf9815134b572b90878eeb48504dda3941ae396620234c06b91660cc2af3bcbe3ad8
7
+ data.tar.gz: cfe8961da484562e10bbc563ac3dce3f58f82262732c62599b9328c301d973e63b89612737854f500bbc933c2aa4fe4dcceaa70ea4c90d5acaeecb751c409fd7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ 1.17.1 / 2024-12-30
2
+ -------------------
3
+
4
+ Fixed:
5
+ * #1117 Restart async callback dispatcher thread after fork.
6
+ * #1133 Add ruby-3.4 native gem.
7
+ * #1134 Fix FFI::DataConverter non-generic usage in RBS files.
8
+
9
+
1
10
  1.17.0 / 2024-06-02
2
11
  -------------------
3
12
 
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ group :development do
5
5
  gem 'bundler', '>= 1.16', '< 3'
6
6
  gem 'rake', '~> 13.0'
7
7
  gem 'rake-compiler', '~> 1.1'
8
- gem 'rake-compiler-dock', '~> 1.0.pre'
8
+ gem 'rake-compiler-dock', '~> 1.7.0'
9
9
  gem 'rspec', '~> 3.0'
10
10
  end
11
11
 
data/Rakefile CHANGED
@@ -136,7 +136,7 @@ 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
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/}
142
142
  EOT
data/lib/3.1/ffi_c.so CHANGED
Binary file
data/lib/3.2/ffi_c.so CHANGED
Binary file
data/lib/3.3/ffi_c.so CHANGED
Binary file
data/lib/3.4/ffi_c.so ADDED
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.1'
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,14 @@
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.1
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Wayne Meissner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-02 00:00:00.000000000 Z
11
+ date: 2024-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -83,6 +83,7 @@ files:
83
83
  - lib/3.1/ffi_c.so
84
84
  - lib/3.2/ffi_c.so
85
85
  - lib/3.3/ffi_c.so
86
+ - lib/3.4/ffi_c.so
86
87
  - lib/ffi.rb
87
88
  - lib/ffi/abstract_memory.rb
88
89
  - lib/ffi/autopointer.rb
@@ -223,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
223
224
  version: '3.1'
224
225
  - - "<"
225
226
  - !ruby/object:Gem::Version
226
- version: 3.4.dev
227
+ version: 3.5.dev
227
228
  required_rubygems_version: !ruby/object:Gem::Requirement
228
229
  requirements:
229
230
  - - ">="