ffi 1.17.0 → 1.17.1
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 +9 -0
- data/Gemfile +1 -1
- data/Rakefile +1 -1
- data/ext/ffi_c/Function.c +52 -34
- data/ext/ffi_c/libffi/configure +1243 -929
- data/ext/ffi_c/libffi/fficonfig.h.in +6 -6
- data/lib/ffi/ffi.rb +59 -0
- data/lib/ffi/version.rb +1 -1
- data/sig/ffi/auto_pointer.rbs +0 -1
- data/sig/ffi/library.rbs +1 -1
- data.tar.gz.sig +0 -0
- metadata +14 -14
- metadata.gz.sig +0 -0
@@ -65,10 +65,10 @@
|
|
65
65
|
/* Define if you support more than one size of the long double type */
|
66
66
|
#undef HAVE_LONG_DOUBLE_VARIANT
|
67
67
|
|
68
|
-
/* Define to 1 if you have the
|
68
|
+
/* Define to 1 if you have the 'memcpy' function. */
|
69
69
|
#undef HAVE_MEMCPY
|
70
70
|
|
71
|
-
/* Define to 1 if you have the
|
71
|
+
/* Define to 1 if you have the 'memfd_create' function. */
|
72
72
|
#undef HAVE_MEMFD_CREATE
|
73
73
|
|
74
74
|
/* Define if your compiler supports pointer authentication. */
|
@@ -131,16 +131,16 @@
|
|
131
131
|
/* Define to the version of this package. */
|
132
132
|
#undef PACKAGE_VERSION
|
133
133
|
|
134
|
-
/* The size of
|
134
|
+
/* The size of 'double', as computed by sizeof. */
|
135
135
|
#undef SIZEOF_DOUBLE
|
136
136
|
|
137
|
-
/* The size of
|
137
|
+
/* The size of 'long double', as computed by sizeof. */
|
138
138
|
#undef SIZEOF_LONG_DOUBLE
|
139
139
|
|
140
|
-
/* The size of
|
140
|
+
/* The size of 'size_t', as computed by sizeof. */
|
141
141
|
#undef SIZEOF_SIZE_T
|
142
142
|
|
143
|
-
/* Define to 1 if all of the
|
143
|
+
/* Define to 1 if all of the C89 standard headers exist (not just the ones
|
144
144
|
required in a freestanding environment). This macro is provided for
|
145
145
|
backward compatibility; new code need not use it. */
|
146
146
|
#undef STDC_HEADERS
|
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/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
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.
|
4
|
+
version: 1.17.1
|
5
5
|
platform: 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I8eWkLaTQeFzs+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: 2024-
|
35
|
+
date: 2024-12-30 00:00:00.000000000 Z
|
36
36
|
dependencies:
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rake
|
@@ -764,7 +764,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
764
764
|
- !ruby/object:Gem::Version
|
765
765
|
version: '0'
|
766
766
|
requirements: []
|
767
|
-
rubygems_version: 3.6.
|
767
|
+
rubygems_version: 3.6.2
|
768
768
|
specification_version: 4
|
769
769
|
summary: Ruby FFI
|
770
770
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|