ffi 1.17.3-aarch64-mingw-ucrt

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.
Files changed (130) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +498 -0
  3. data/COPYING +49 -0
  4. data/Gemfile +26 -0
  5. data/LICENSE +24 -0
  6. data/LICENSE.SPECS +22 -0
  7. data/README.md +138 -0
  8. data/Rakefile +209 -0
  9. data/Steepfile +8 -0
  10. data/ffi.gemspec +41 -0
  11. data/lib/3.4/ffi_c.so +0 -0
  12. data/lib/4.0/ffi_c.so +0 -0
  13. data/lib/ffi/abstract_memory.rb +44 -0
  14. data/lib/ffi/autopointer.rb +186 -0
  15. data/lib/ffi/buffer.rb +4 -0
  16. data/lib/ffi/callback.rb +4 -0
  17. data/lib/ffi/compat.rb +54 -0
  18. data/lib/ffi/data_converter.rb +67 -0
  19. data/lib/ffi/dynamic_library.rb +118 -0
  20. data/lib/ffi/enum.rb +302 -0
  21. data/lib/ffi/errno.rb +43 -0
  22. data/lib/ffi/ffi.rb +109 -0
  23. data/lib/ffi/function.rb +94 -0
  24. data/lib/ffi/io.rb +62 -0
  25. data/lib/ffi/library.rb +592 -0
  26. data/lib/ffi/library_path.rb +109 -0
  27. data/lib/ffi/managedstruct.rb +84 -0
  28. data/lib/ffi/memorypointer.rb +1 -0
  29. data/lib/ffi/platform/aarch64-darwin/types.conf +130 -0
  30. data/lib/ffi/platform/aarch64-freebsd/types.conf +128 -0
  31. data/lib/ffi/platform/aarch64-freebsd12/types.conf +181 -0
  32. data/lib/ffi/platform/aarch64-linux/types.conf +175 -0
  33. data/lib/ffi/platform/aarch64-openbsd/types.conf +134 -0
  34. data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
  35. data/lib/ffi/platform/arm-freebsd/types.conf +152 -0
  36. data/lib/ffi/platform/arm-freebsd12/types.conf +152 -0
  37. data/lib/ffi/platform/arm-linux/types.conf +132 -0
  38. data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
  39. data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
  40. data/lib/ffi/platform/i386-cygwin/types.conf +3 -0
  41. data/lib/ffi/platform/i386-darwin/types.conf +100 -0
  42. data/lib/ffi/platform/i386-freebsd/types.conf +152 -0
  43. data/lib/ffi/platform/i386-freebsd12/types.conf +152 -0
  44. data/lib/ffi/platform/i386-gnu/types.conf +107 -0
  45. data/lib/ffi/platform/i386-linux/types.conf +103 -0
  46. data/lib/ffi/platform/i386-netbsd/types.conf +126 -0
  47. data/lib/ffi/platform/i386-openbsd/types.conf +128 -0
  48. data/lib/ffi/platform/i386-solaris/types.conf +122 -0
  49. data/lib/ffi/platform/i386-windows/types.conf +52 -0
  50. data/lib/ffi/platform/ia64-linux/types.conf +104 -0
  51. data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
  52. data/lib/ffi/platform/mips-linux/types.conf +102 -0
  53. data/lib/ffi/platform/mips64-linux/types.conf +104 -0
  54. data/lib/ffi/platform/mips64el-linux/types.conf +104 -0
  55. data/lib/ffi/platform/mipsel-linux/types.conf +102 -0
  56. data/lib/ffi/platform/mipsisa32r6-linux/types.conf +102 -0
  57. data/lib/ffi/platform/mipsisa32r6el-linux/types.conf +102 -0
  58. data/lib/ffi/platform/mipsisa64r6-linux/types.conf +104 -0
  59. data/lib/ffi/platform/mipsisa64r6el-linux/types.conf +104 -0
  60. data/lib/ffi/platform/powerpc-aix/types.conf +180 -0
  61. data/lib/ffi/platform/powerpc-darwin/types.conf +100 -0
  62. data/lib/ffi/platform/powerpc-linux/types.conf +130 -0
  63. data/lib/ffi/platform/powerpc-openbsd/types.conf +156 -0
  64. data/lib/ffi/platform/powerpc64-linux/types.conf +104 -0
  65. data/lib/ffi/platform/powerpc64le-linux/types.conf +100 -0
  66. data/lib/ffi/platform/riscv64-linux/types.conf +104 -0
  67. data/lib/ffi/platform/s390-linux/types.conf +102 -0
  68. data/lib/ffi/platform/s390x-linux/types.conf +102 -0
  69. data/lib/ffi/platform/sparc-linux/types.conf +102 -0
  70. data/lib/ffi/platform/sparc-solaris/types.conf +128 -0
  71. data/lib/ffi/platform/sparcv9-linux/types.conf +102 -0
  72. data/lib/ffi/platform/sparcv9-openbsd/types.conf +156 -0
  73. data/lib/ffi/platform/sparcv9-solaris/types.conf +128 -0
  74. data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
  75. data/lib/ffi/platform/x86_64-cygwin/types.conf +3 -0
  76. data/lib/ffi/platform/x86_64-darwin/types.conf +130 -0
  77. data/lib/ffi/platform/x86_64-dragonflybsd/types.conf +130 -0
  78. data/lib/ffi/platform/x86_64-freebsd/types.conf +128 -0
  79. data/lib/ffi/platform/x86_64-freebsd12/types.conf +158 -0
  80. data/lib/ffi/platform/x86_64-haiku/types.conf +117 -0
  81. data/lib/ffi/platform/x86_64-linux/types.conf +132 -0
  82. data/lib/ffi/platform/x86_64-msys/types.conf +119 -0
  83. data/lib/ffi/platform/x86_64-netbsd/types.conf +128 -0
  84. data/lib/ffi/platform/x86_64-openbsd/types.conf +134 -0
  85. data/lib/ffi/platform/x86_64-solaris/types.conf +122 -0
  86. data/lib/ffi/platform/x86_64-windows/types.conf +52 -0
  87. data/lib/ffi/platform.rb +187 -0
  88. data/lib/ffi/pointer.rb +167 -0
  89. data/lib/ffi/struct.rb +317 -0
  90. data/lib/ffi/struct_by_reference.rb +72 -0
  91. data/lib/ffi/struct_layout.rb +96 -0
  92. data/lib/ffi/struct_layout_builder.rb +227 -0
  93. data/lib/ffi/tools/const_generator.rb +232 -0
  94. data/lib/ffi/tools/generator.rb +105 -0
  95. data/lib/ffi/tools/generator_task.rb +32 -0
  96. data/lib/ffi/tools/struct_generator.rb +195 -0
  97. data/lib/ffi/types.rb +222 -0
  98. data/lib/ffi/union.rb +43 -0
  99. data/lib/ffi/variadic.rb +80 -0
  100. data/lib/ffi/version.rb +3 -0
  101. data/lib/ffi.rb +27 -0
  102. data/samples/getlogin.rb +8 -0
  103. data/samples/getpid.rb +8 -0
  104. data/samples/gettimeofday.rb +18 -0
  105. data/samples/hello.rb +8 -0
  106. data/samples/hello_ractor.rb +19 -0
  107. data/samples/inotify.rb +60 -0
  108. data/samples/pty.rb +75 -0
  109. data/samples/qsort.rb +20 -0
  110. data/samples/qsort_ractor.rb +36 -0
  111. data/sig/ffi/abstract_memory.rbs +165 -0
  112. data/sig/ffi/auto_pointer.rbs +26 -0
  113. data/sig/ffi/buffer.rbs +18 -0
  114. data/sig/ffi/data_converter.rbs +10 -0
  115. data/sig/ffi/dynamic_library.rbs +9 -0
  116. data/sig/ffi/enum.rbs +38 -0
  117. data/sig/ffi/errno.rbs +8 -0
  118. data/sig/ffi/function.rbs +39 -0
  119. data/sig/ffi/library.rbs +42 -0
  120. data/sig/ffi/native_type.rbs +86 -0
  121. data/sig/ffi/platform.rbs +49 -0
  122. data/sig/ffi/pointer.rbs +42 -0
  123. data/sig/ffi/struct.rbs +76 -0
  124. data/sig/ffi/struct_by_reference.rbs +11 -0
  125. data/sig/ffi/struct_by_value.rbs +7 -0
  126. data/sig/ffi/struct_layout.rbs +9 -0
  127. data/sig/ffi/struct_layout_builder.rbs +5 -0
  128. data/sig/ffi/type.rbs +39 -0
  129. data/sig/ffi.rbs +29 -0
  130. metadata +179 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 4c9e6de6590f18e5a01cdc051717fe2789609f67f0489bb104bdf4138214ca21
4
+ data.tar.gz: 53be3763f6c9c3f45ac211c887b493a0e1c83e102295d4f4dd3616c914d06948
5
+ SHA512:
6
+ metadata.gz: f8863ccb53576635a14be302b0e887ea80df5c96e1107fcad524a0bb9b3202accabff1fdda1d1f111a574f002e7b339a9c75bff51a5ba71bd535bb5ef7d0e203
7
+ data.tar.gz: f928ace18c86b3974793ebde768938abab16a4f5e617ae6705909a7821240eb5e1c40a49615002ddc792004680b791dfcc2c666c4b68f3429a4189c312767e48
data/CHANGELOG.md ADDED
@@ -0,0 +1,498 @@
1
+ 1.17.3 / 2025-12-29
2
+ -------------------
3
+
4
+ Fixed:
5
+ * Opt-in for MFA requirement explicitly. #1159
6
+ * Fix type signature for FFI::AutoPointer#initialize, FFI::StructByReference#native_type and FFI::Struct#auto_ptr . #1158
7
+ * Fix function signature of function_call in FFI trampoline. #1154
8
+ It failed on `aarch64-mingw-ucrt`.
9
+ * Add workaround for segmentation faults on `aarch64-mingw-ucrt`. #1154
10
+ * Call super in `Library#freeze` . #1154
11
+ * Deny duplication of AutoPointer per #dup and #clone . #1173
12
+ They led to double free before.
13
+
14
+ Added:
15
+ * Add binary gems for Ruby-4.0, now providing binary gems for Ruby-3.0 to 4.0.
16
+ * Add msys2_mingw_dependencies for Windows Mingw for automatic installation of libffi. #1143
17
+ * Mark callback dispatcher thread as fork safe for Puma. #1156
18
+ * Add missing FFI::Platform module and LastError signatures. #1169
19
+
20
+ Removed:
21
+ * Drop fat binary gems for Ruby-2.7
22
+ * Remove `FFI::TypesGenerator` from distributed gems. #1164
23
+ * Remove libffi build dir after install, safing some install space. #1157
24
+
25
+
26
+ 1.17.2 / 2025-04-15
27
+ -------------------
28
+
29
+ Fixed:
30
+ * #1144, #1145 Update libffi to 3.4.8 to fix installation issues on latest Macos on ARM64
31
+ * Various adjustments to run the specs cleanly on Ruby-3.5 master branch.
32
+
33
+
34
+ 1.17.1 / 2024-12-30
35
+ -------------------
36
+
37
+ Fixed:
38
+ * #1117 Restart async callback dispatcher thread after fork.
39
+ * #1133 Add ruby-3.4 native gem.
40
+ * #1134 Fix FFI::DataConverter non-generic usage in RBS files.
41
+
42
+
43
+ 1.17.0 / 2024-06-02
44
+ -------------------
45
+
46
+ Fixed:
47
+ * Add FFI::AbstractMemory#read_array_of_string . It was defined but not exposed to Ruby nor tested. #1070
48
+
49
+
50
+ 1.17.0.rc2 / 2024-04-22
51
+ -------------------
52
+
53
+ Fixed:
54
+ * Add missing write barriers to StructLayout#initialize causing a segfault with GC.stress. #1079
55
+
56
+
57
+ 1.17.0.rc1 / 2024-04-08
58
+ -------------------
59
+
60
+ Fixed:
61
+ * Fix type definitions on `aarch64-linux`. #1067, #1066
62
+ * Use RB_TEST for `Pointer.autorelease=` . #1065
63
+ So that `false` and `nil` are treated as falsey and anything else as truthy.
64
+ * Replace Fixnum by Integer. #1064
65
+ Fixnum is no longer present in the ruby language.
66
+ * Update `FFI::NativeType` doc. #1061
67
+ * Store FFI::Type::Mapped of FFI::StrPtrConverter in global instead of custom type map
68
+ * Various documentation fixes. #1042
69
+ * Update `FFI::Pointer#==` to return `false` if a pointer is compared to a non-pointer object, which is the expected behavior. #1083
70
+ * Avoid warning about undefined wariable `@ffi_functions` #1085
71
+ * Fix a very unlikely GC bug when using a callback block. # 1089
72
+
73
+ Added:
74
+ * Provide binary gems for many platforms. #990
75
+ * Add Windows fat binary gem for Ruby-3.3
76
+ * Add RBS type definitions for many user facing parts of the FFI API. #1042
77
+ * Improve fallback search path logic. #1088
78
+ Respect LD_LIBRARY_PATH and DYLD_LIBRARY_PATH on Macos.
79
+ * Update libffi to current git master branch.
80
+
81
+ Removed:
82
+ * Remove `enum CHAR_ARRAY` which is no longer used. #1063
83
+
84
+
85
+ 1.16.3 / 2023-10-04
86
+ -------------------
87
+
88
+ Fixed:
89
+ * Fix gcc error when building on CentOS 7. #1052
90
+ * Avoid trying to store new DataConverter type in frozen TypeDefs hash. #1057
91
+
92
+
93
+ 1.16.2 / 2023-09-25
94
+ -------------------
95
+
96
+ Fixed:
97
+ * Handle null pointer crash after fork. #1051
98
+
99
+
100
+ 1.16.1 / 2023-09-24
101
+ -------------------
102
+
103
+ Fixed:
104
+ * Fix compiling the builtin libffi. #1049
105
+
106
+
107
+ 1.16.0 / 2023-09-23
108
+ -------------------
109
+
110
+ Fixed:
111
+ * Fix an issue with signed bitmasks when using flags on the most significant bit. #949
112
+ * Fix FFI::Pointer#initialize using NUM2LL instead of NUM2ULL.
113
+ * Fix FFI::Type#inspect to properly display the constant name. #1002
114
+ * Use libffi closure allocations on hppa-Linux. #1017
115
+ Previously they would segfault.
116
+ * Fix class name of Symbol#inspect.
117
+ * Fix MSVC support of libtest. #1028
118
+ * Fix attach_function of functions ending in ? or ! #971
119
+
120
+ Added:
121
+ * Convert all C-based classes to TypedData and use write barriers. #994, #995, #996, #997, #998, #999, #1000, #1001, #1003, #1004, #1005, #1006, #1007, #1008, #1009, #1010, #1011, #1012
122
+ This results in less pressure on the garbage collector, since the objects can be promoted to the old generation, which means they only get marked on major GC.
123
+ * Implement `ObjectSpace.memsize_of()` of all C-based classes.
124
+ * Make FFI Ractor compatible. #1023
125
+ Modules extended per `extend FFI::Library` need to be frozen in order to be used by non-main Ractors.
126
+ This can be done by calling `freeze` below of all C interface definitions.
127
+ * In a Ractor it's possible to:
128
+ * load DLLs and call its functions, access its global variables
129
+ * use builtin typedefs
130
+ * use and modify ractor local typedefs
131
+ * define callbacks
132
+ * receive async callbacks from non-ruby threads
133
+ * use frozen FFI::Library based modules with all attributes (enums, structs, typedefs, functions, callbacks)
134
+ * invoke frozen functions and callbacks defined in the main Ractor
135
+ * use FFI::Struct definitions from the main Ractor
136
+ * In a Ractor it's impossible to:
137
+ * create new FFI::Library based modules
138
+ * create new FFI::Struct definitions
139
+ * use custom global typedefs
140
+ * use non-frozen FFI::Library based modules
141
+ * Allow type retrieval of attached functions+variables. #1023
142
+ * Make FFI classes `GC.compact` friendly. #1021
143
+ * Update libffi and disable custom trampoline when using libffi closure allocation. #1020
144
+ This is because libffi changed the way how closures are allocated to static trampolines.
145
+ * Add types.conf for loongarch64-linux. #943
146
+ * Add types.conf for sw_64-linux (Shen Wei 64-bit, based on Alpha). #1018
147
+ * Add support for aarch64-windows. #1035
148
+ * Windows: Update LoadLibrary error message to include error code. #1026
149
+ * Allow private release method for FFI::ManagedStruct and FFI::AutoPointer. #1029
150
+ * Add support for passing ABI version to FFI.map_library_name. #963
151
+ This adds the new class FFI::LibraryPath .
152
+ * Add support for ruby-3.2 to windows binary gem. #1047
153
+ * Enable debug symbols for `rake compile` builds to ease debugging. #1048
154
+
155
+ Removed:
156
+ * Remove allocator of AbstractMemory. #1013
157
+ This disables AbstractMemory.new, which has no practical use.
158
+ * Remove unused FFI::SizeTypes. #1022
159
+
160
+
161
+ 1.15.5 / 2022-01-10
162
+ -------------------
163
+
164
+ Fixed:
165
+ * Fix long double argument or return values on 32bit i686. #849
166
+ * FFI::ConstGenerator: avoid usage of the same binary file simultaneously. #929
167
+
168
+ Added:
169
+ * Add Windows fat binary gem for Ruby-3.1
170
+
171
+ Removed:
172
+ * Remove Windows fat binary gem for Ruby < 2.4
173
+
174
+
175
+ 1.15.4 / 2021-09-01
176
+ -------------------
177
+
178
+ Fixed:
179
+ * Fix build for uClibc. #913
180
+ * Correct module lookup when including `ffi-module` gem. #912
181
+
182
+ Changed:
183
+ * Use ruby code of the ffi gem in JRuby-9.2.20+. #915
184
+
185
+
186
+ 1.15.3 / 2021-06-16
187
+ -------------------
188
+
189
+ Fixed:
190
+ * Fix temporary packaging issue with libffi. #904
191
+
192
+
193
+ 1.15.2 / 2021-06-16
194
+ -------------------
195
+
196
+ Added:
197
+ * Add support for Windows MINGW-UCRT build. #903
198
+ * Add `/opt/homebrew/lib/` to fallback search paths to improve homebrew support. #880 #882
199
+
200
+ Changed:
201
+ * Regenerate `types.conf` for FreeBSD12 aarch64. #902
202
+
203
+
204
+ 1.15.1 / 2021-05-22
205
+ -------------------
206
+
207
+ Fixed:
208
+ * Append -pthread to linker options. #893
209
+ * Use arm or aarch64 to identify Apple ARM CPU arch. #899
210
+ * Allow overriding `gcc` with the `CC` env var in `const_generator.rb` and `struct_generator.rb`. #897
211
+
212
+
213
+ 1.15.0 / 2021-03-05
214
+ -------------------
215
+
216
+ Fixed:
217
+ * Fix MSVC build
218
+ * Fix async callbacks in conjunction with fork(). #884
219
+
220
+ Added:
221
+ * Allow to pass callbacks in varargs. #885
222
+ * Name the threads for FFI callback dispatcher and async thread calls for easier debugging. #883
223
+ The name can be retrieved by Thread.name and is shown by Thread.list.inspect etc.
224
+ Even gdb shows the thread name on supported operating systems.
225
+ * Add types.conf for powerpc64le-linux
226
+ * Add types.conf for riscv64-linux
227
+ * More release automation of ffi gems
228
+
229
+ Changed:
230
+ * Switch from rubygems-tasks to bundler/gem_helper
231
+
232
+ Removed:
233
+ * Remove unused VariadicInvoker#init
234
+
235
+
236
+ 1.14.2 / 2020-12-21
237
+ -------------------
238
+
239
+ Fixed:
240
+ * Fix builtin libffi on newer Ubuntu caused by an outdated Makefile.in . #863
241
+
242
+
243
+ 1.14.1 / 2020-12-19
244
+ -------------------
245
+
246
+ Changed:
247
+ * Revert changes to FFI::Pointer#write_string made in ffi-1.14.0.
248
+ It breaks compatibilty in a way that can cause hard to find errors. #857
249
+
250
+
251
+ 1.14.0 / 2020-12-18
252
+ -------------------
253
+
254
+ Added:
255
+ * Add types.conf for x86_64-msys, x86_64-haiku, aarch64-openbsd and aarch64-darwin (alias arm64-darwin)
256
+ * Add method AbstractMemory#size_limit? . #829
257
+ * Add new extconf option --enable-libffi-alloc which is enabled per default on Apple M1 (arm64-darwin).
258
+
259
+ Changed:
260
+ * Do NULL pointer check only when array length > 0 . #305
261
+ * Raise an error on an unknown order argument. #830
262
+ * Change FFI::Pointer#write_string to terminate with a NUL byte like other string methods. #805
263
+ * Update bundled libffi to latest master.
264
+
265
+ Removed:
266
+ * Remove win32/stdint.h and stdbool.h because of copyright issue. #693
267
+
268
+ Fixed:
269
+ * Fix possible UTF-8 load error in loader script interpretation. #792
270
+ * Fix segfault on non-array argument to #write_array_of_*
271
+ * Fix memory leak in MethodHandle . #815
272
+ * Fix possible segfault in combination with fiddle or other libffi using gems . #835
273
+ * Fix possibility to use ffi ruby gem with JRuby-9.3 . #763
274
+ * Fix a GC issue, when a callback Proc is used on more than 2 callback signatures. #820
275
+
276
+
277
+ 1.13.1 / 2020-06-09
278
+ -------------------
279
+
280
+ Changed:
281
+ * Revert use of `ucrtbase.dll` as default C library on Windows-MINGW.
282
+ `ucrtbase.dll` is still used on MSWIN target. #790
283
+ * Test for `ffi_prep_closure_loc()` to make sure we can use this function.
284
+ This fixes incorrect use of system libffi on MacOS Mojave (10.14). #787
285
+ * Update types.conf on x86_64-dragonflybsd
286
+
287
+
288
+ 1.13.0 / 2020-06-01
289
+ -------------------
290
+
291
+ Added:
292
+ * Add TruffleRuby support. Almost all specs are running on TruffleRuby and succeed. #768
293
+ * Add ruby source files to the java gem. This allows to ship the Ruby library code per platform java gem and add it as a default gem to JRuby. #763
294
+ * Add FFI::Platform::LONG_DOUBLE_SIZE
295
+ * Add bounds checks for writing to an inline char[] . #756
296
+ * Add long double as callback return value. #771
297
+ * Update type definitions and add types from stdint.h and stddef.h on i386-windows, x86_64-windows, x86_64-darwin, x86_64-linux, arm-linux, powerpc-linux. #749
298
+ * Add new type definitions for powerpc-openbsd and sparcv9-openbsd. #775, #778
299
+
300
+ Changed:
301
+ * Raise required ruby version to >= 2.3.
302
+ * Lots of cleanups and improvements in library, specs and benchmarks.
303
+ * Fix a lot of compiler warnings at the C-extension
304
+ * Fix several install issues on MacOS:
305
+ * Look for libffi in SDK paths, since recent versions of macOS removed it from `/usr/include` . #757
306
+ * Fix error `ld: library not found for -lgcc_s.10.4`
307
+ * Don't built for i386 architecture as it is deprecated
308
+ * Several fixes for MSVC build on Windows. #779
309
+ * Use `ucrtbase.dll` as default C library on Windows instead of old `msvcrt.dll`. #779
310
+ * Update builtin libffi to fix a Powerpc issue with parameters of type long
311
+ * Allow unmodified sourcing of (the ruby code of) this gem in JRuby and TruffleRuby as a default gem. #747
312
+ * Improve check to detect if a module has a #find_type method suitable for FFI. This fixes compatibility with stdlib `mkmf` . #776
313
+
314
+ Removed:
315
+ * Reject callback with `:string` return type at definition, because it didn't work so far and is not save to use. #751, #782
316
+
317
+
318
+ 1.12.2 / 2020-02-01
319
+ -------------------
320
+
321
+ * Fix possible segfault at FFI::Struct#[] and []= after GC.compact . #742
322
+
323
+
324
+ 1.12.1 / 2020-01-14
325
+ -------------------
326
+
327
+ Added:
328
+ * Add binary gem support for ruby-2.7 on Windows
329
+
330
+
331
+ 1.12.0 / 2020-01-14
332
+ -------------------
333
+
334
+ Added:
335
+ * FFI::VERSION is defined as part of `require 'ffi'` now.
336
+ It is no longer necessary to `require 'ffi/version'` .
337
+
338
+ Changed:
339
+ * Update libffi to latest master.
340
+
341
+ Deprecated:
342
+ * Overwriting struct layouts is now warned and will be disallowed in ffi-2.0. #734, #735
343
+
344
+
345
+ 1.11.3 / 2019-11-25
346
+ -------------------
347
+
348
+ Removed:
349
+ * Remove support for tainted objects which cause deprecation warnings in ruby-2.7. #730
350
+
351
+
352
+ 1.11.2 / 2019-11-11
353
+ -------------------
354
+
355
+ Added:
356
+ * Add DragonFlyBSD as a platform. #724
357
+
358
+ Changed:
359
+ * Sort all types.conf files, so that files and changes are easier to compare.
360
+ * Regenerated type conf for freebsd12 and x86_64-linux targets. #722
361
+ * Remove MACOSX_DEPLOYMENT_TARGET that was targeting very old version 10.4. #647
362
+ * Fix library name mangling for non glibc Linux/UNIX. #727
363
+ * Fix compiler warnings raised by ruby-2.7
364
+ * Update libffi to latest master.
365
+
366
+
367
+ 1.11.1 / 2019-05-20
368
+ -------------------
369
+
370
+ Changed:
371
+ * Raise required ruby version to >=2.0. #699, #700
372
+ * Fix a possible linker error on ruby < 2.3 on Linux.
373
+
374
+
375
+ 1.11.0 / 2019-05-17
376
+ -------------------
377
+ This version was yanked on 2019-05-20 to fix an install issue on ruby-1.9.3. #700
378
+
379
+ Added:
380
+ * Add ability to disable or force use of system libffi. #669
381
+ Use like `gem inst ffi -- --enable-system-libffi` .
382
+ * Add ability to call FFI callbacks from outside of FFI call frame. #584
383
+ * Add proper documentation to FFI::Generator and ::Task
384
+ * Add gemspec metadata. #696, #698
385
+
386
+ Changed:
387
+ * Fix stdcall on Win32. #649, #669
388
+ * Fix load paths for FFI::Generator::Task
389
+ * Fix FFI::Pointer#read_string(0) to return a binary String. #692
390
+ * Fix benchmark suite so that it runs on ruby-2.x
391
+ * Move FFI::Platform::CPU from C to Ruby. #663
392
+ * Move FFI::StructByReference to Ruby. #681
393
+ * Move FFI::DataConverter to Ruby (#661)
394
+ * Various cleanups and improvements of specs and benchmarks
395
+
396
+ Removed:
397
+ * Remove ruby-1.8 and 1.9 compatibility code. #683
398
+ * Remove unused spec files. #684
399
+
400
+
401
+ 1.10.0 / 2019-01-06
402
+ -------------------
403
+
404
+ Added:
405
+ * Add /opt/local/lib/ to ffi's fallback library search path. #638
406
+ * Add binary gem support for ruby-2.6 on Windows
407
+ * Add FreeBSD on AArch64 and ARM support. #644
408
+ * Add FFI::LastError.winapi_error on Windows native or Cygwin. #633
409
+
410
+ Changed:
411
+ * Update to rake-compiler-dock-0.7.0
412
+ * Use 64-bit inodes on FreeBSD >= 12. #644
413
+ * Switch time_t and suseconds_t types to long on FreeBSD. #627
414
+ * Make register_t long_long on 64-bit FreeBSD. #644
415
+ * Fix Pointer#write_array_of_type #637
416
+
417
+ Removed:
418
+ * Drop binary gem support for ruby-2.0 and 2.1 on Windows
419
+
420
+
421
+ 1.9.25 / 2018-06-03
422
+ -------------------
423
+
424
+ Changed:
425
+ * Revert closures via libffi.
426
+ This re-adds ClosurePool and fixes compat with SELinux enabled systems. #621
427
+
428
+
429
+ 1.9.24 / 2018-06-02
430
+ -------------------
431
+
432
+ Security Note:
433
+
434
+ This update addresses vulnerability CVE-2018-1000201: DLL loading issue which can be hijacked on Windows OS, when a Symbol is used as DLL name instead of a String. Found by Matthew Bush.
435
+
436
+ Added:
437
+ * Added a CHANGELOG file
438
+ * Add mips64(eb) support, and mips r6 support. (#601)
439
+
440
+ Changed:
441
+ * Update libffi to latest changes on master.
442
+ * Don't search in hardcoded /usr paths on Windows.
443
+ * Don't treat Symbol args different to Strings in ffi_lib.
444
+ * Make sure size_t is defined in Thread.c. Fixes #609
445
+
446
+
447
+ 1.9.23 / 2018-02-25
448
+ -------------------
449
+
450
+ Changed:
451
+ * Fix unnecessary rebuild of configure in darwin multi arch. Fixes #605
452
+
453
+
454
+ 1.9.22 / 2018-02-22
455
+ -------------------
456
+
457
+ Changed:
458
+ * Update libffi to latest changes on master.
459
+ * Update detection of system libffi to match new requirements. Fixes #617
460
+ * Prefer bundled libffi over system libffi on Mac OS.
461
+ * Do closures via libffi. This removes ClosurePool and fixes compat with PaX. #540
462
+ * Use a more deterministic gem packaging.
463
+ * Fix unnecessary update of autoconf files at gem install.
464
+
465
+
466
+ 1.9.21 / 2018-02-06
467
+ -------------------
468
+
469
+ Added:
470
+ * Ruby-2.5 support by Windows binary gems. Fixes #598
471
+ * Add missing win64 types.
472
+ * Added support for Bitmask. (#573)
473
+ * Add support for MSYS2 (#572) and Sparc64 Linux. (#574)
474
+
475
+ Changed:
476
+ * Fix read_string to not throw an error on length 0.
477
+ * Don't use absolute paths for sh and env. Fixes usage on Adroid #528
478
+ * Use Ruby implementation for `which` for better compat with Windows. Fixes #315
479
+ * Fix compatibility with PPC64LE platform. (#577)
480
+ * Normalize sparc64 to sparcv9. (#575)
481
+
482
+ Removed:
483
+ * Drop Ruby 1.8.7 support (#480)
484
+
485
+
486
+ 1.9.18 / 2017-03-03
487
+ -------------------
488
+
489
+ Added:
490
+ * Add compatibility with Ruby-2.4.
491
+
492
+ Changed:
493
+ * Add missing shlwapi.h include to fix Windows build.
494
+ * Avoid undefined behaviour of LoadLibrary() on Windows. #553
495
+
496
+
497
+ 1.9.17 / 2017-01-13
498
+ -------------------
data/COPYING ADDED
@@ -0,0 +1,49 @@
1
+ Copyright (c) 2008-2013, Ruby FFI project contributors
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the Ruby FFI project nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+
26
+ libffi, used by this project, is licensed under the MIT license:
27
+
28
+ libffi - Copyright (c) 1996-2011 Anthony Green, Red Hat, Inc and others.
29
+ See source files for details.
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining
32
+ a copy of this software and associated documentation files (the
33
+ ``Software''), to deal in the Software without restriction, including
34
+ without limitation the rights to use, copy, modify, merge, publish,
35
+ distribute, sublicense, and/or sell copies of the Software, and to
36
+ permit persons to whom the Software is furnished to do so, subject to
37
+ the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be
40
+ included in all copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
43
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
44
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
45
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
46
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
47
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
48
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
49
+
data/Gemfile ADDED
@@ -0,0 +1,26 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development do
6
+ gem 'benchmark' # necessary on ruby-3.5+
7
+ gem 'bigdecimal' # necessary on ruby-3.3+
8
+ gem 'bundler', '>= 1.16', '< 5.dev'
9
+ gem 'fiddle' # necessary on ruby-4.0+
10
+ gem 'rake', '~> 13.0'
11
+ gem 'rake-compiler', '~> 1.1'
12
+ gem 'rake-compiler-dock', '~> 1.11.0'
13
+ gem 'rspec', '~> 3.0'
14
+ end
15
+
16
+ group :doc do
17
+ gem 'kramdown'
18
+ gem 'yard', '~> 0.9'
19
+ end
20
+
21
+ group :type_check do
22
+ if RUBY_VERSION >= "3.0" && %w[ ruby truffleruby ].include?(RUBY_ENGINE)
23
+ gem 'rbs', '~> 3.0'
24
+ gem 'steep', '~> 1.6'
25
+ end
26
+ end
data/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2008-2016, Ruby FFI project contributors
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the Ruby FFI project nor the
12
+ names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
data/LICENSE.SPECS ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2008-2012 Ruby-FFI contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.