ffi 1.17.0-java → 1.17.1-java

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: 339482a2db268d08ac79e7205fb1dd77b83f06c6a69f698cd35eed5e4063e899
4
- data.tar.gz: 022aa0d53823dc33bf77698efac9f057c9ad5987819fd1c2ad3b2f90ad3f7be6
3
+ metadata.gz: 8cb497d3eff5533e63c8d7991561d45dc949996aaa28f0bf6815dc694775c70b
4
+ data.tar.gz: c9fc7ac503b8b8049398eb5ad3c24c99ca2912ea2b84bbda858f3d919e12f0ec
5
5
  SHA512:
6
- metadata.gz: 68f15f9afd458da3fb4aa52debe5418a6732184f27d40ca3c85ada225f0192b7b6a7db3b631896d57933c8d9ac2d272254798a9c72db1c958076d444a36cb726
7
- data.tar.gz: 7a9181876be8f2c46317f0c00f801fe1748d8e4716df99adf9d8d864146c6d49d6b40ae6b64bb2a33709956df6128d4254eaadaeff61547416f11e6a83b4c34c
6
+ metadata.gz: 57f6c7d3d899a7a97395927a4dce6f18e7960a959a6fe3ba10f90222c8220e28d2856f5c4af3d90d49b05f50aca7bff3d775a52ab4f9ae9954d01092d3a1b95d
7
+ data.tar.gz: 77bc3bce7f6e95ec26dc800078f6b23a9863d1c9ed873ae7aab667908ef07be727c9dac06f138a8866fc9b766fbe04ca4c9eb9743be893d8aee7fa1334fef39a
checksums.yaml.gz.sig CHANGED
Binary file
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/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
data.tar.gz.sig CHANGED
Binary file
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.0
4
+ version: 1.17.1
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
- L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yNDAyMjgxOTMxNDdaFw0yNTAy
14
- MjcxOTMxNDdaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
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
- 7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEArBmHSfnUyNWf3R1Fx0mMHloWGdcKn2D2
26
- BsqTApXU2nADiyppIqRq4b9e7hw342uzadSLk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
34
  -----END CERTIFICATE-----
35
- date: 2024-06-02 00:00:00.000000000 Z
35
+ date: 2024-12-30 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.0.dev
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