ffi 1.15.4 → 1.16.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (312) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/CHANGELOG.md +90 -0
  4. data/Gemfile +1 -1
  5. data/README.md +3 -2
  6. data/Rakefile +28 -11
  7. data/ext/ffi_c/AbstractMemory.c +60 -36
  8. data/ext/ffi_c/AbstractMemory.h +3 -2
  9. data/ext/ffi_c/ArrayType.c +49 -13
  10. data/ext/ffi_c/ArrayType.h +1 -0
  11. data/ext/ffi_c/Buffer.c +86 -29
  12. data/ext/ffi_c/Call.c +18 -7
  13. data/ext/ffi_c/DynamicLibrary.c +89 -26
  14. data/ext/ffi_c/Function.c +244 -98
  15. data/ext/ffi_c/Function.h +1 -0
  16. data/ext/ffi_c/FunctionInfo.c +80 -24
  17. data/ext/ffi_c/LastError.c +25 -7
  18. data/ext/ffi_c/MappedType.c +66 -23
  19. data/ext/ffi_c/MappedType.h +0 -2
  20. data/ext/ffi_c/MemoryPointer.c +34 -7
  21. data/ext/ffi_c/MethodHandle.c +3 -1
  22. data/ext/ffi_c/Pointer.c +68 -29
  23. data/ext/ffi_c/Pointer.h +1 -0
  24. data/ext/ffi_c/Struct.c +155 -80
  25. data/ext/ffi_c/Struct.h +7 -4
  26. data/ext/ffi_c/StructByValue.c +48 -16
  27. data/ext/ffi_c/StructLayout.c +117 -48
  28. data/ext/ffi_c/Type.c +104 -36
  29. data/ext/ffi_c/Type.h +3 -1
  30. data/ext/ffi_c/Types.c +1 -1
  31. data/ext/ffi_c/Variadic.c +65 -23
  32. data/ext/ffi_c/compat.h +22 -22
  33. data/ext/ffi_c/extconf.rb +19 -2
  34. data/ext/ffi_c/ffi.c +4 -0
  35. data/ext/ffi_c/libffi/.appveyor/site.exp +16 -0
  36. data/ext/ffi_c/libffi/.appveyor/unix-noexec.exp +7 -0
  37. data/ext/ffi_c/libffi/.appveyor.yml +27 -9
  38. data/ext/ffi_c/libffi/.ci/build-cross-in-container.sh +18 -0
  39. data/ext/ffi_c/libffi/{.travis → .ci}/build-in-container.sh +4 -6
  40. data/ext/ffi_c/libffi/.ci/build.sh +124 -0
  41. data/ext/ffi_c/libffi/{.travis → .ci}/install.sh +14 -7
  42. data/ext/ffi_c/libffi/.ci/msvs-detect +1103 -0
  43. data/ext/ffi_c/libffi/{.travis → .ci}/site.exp +5 -3
  44. data/ext/ffi_c/libffi/.circleci/config.yml +156 -0
  45. data/ext/ffi_c/libffi/.github/workflows/build.yml +460 -0
  46. data/ext/ffi_c/libffi/.github/workflows/emscripten.yml +171 -0
  47. data/ext/ffi_c/libffi/.gitignore +10 -2
  48. data/ext/ffi_c/libffi/LICENSE +1 -1
  49. data/ext/ffi_c/libffi/Makefile.am +12 -5
  50. data/ext/ffi_c/libffi/Makefile.in +92 -34
  51. data/ext/ffi_c/libffi/README.md +144 -104
  52. data/ext/ffi_c/libffi/acinclude.m4 +10 -112
  53. data/ext/ffi_c/libffi/compile +348 -0
  54. data/ext/ffi_c/libffi/config.guess +623 -556
  55. data/ext/ffi_c/libffi/config.sub +75 -34
  56. data/ext/ffi_c/libffi/configure +4567 -3822
  57. data/ext/ffi_c/libffi/configure.ac +64 -28
  58. data/ext/ffi_c/libffi/configure.host +25 -6
  59. data/ext/ffi_c/libffi/doc/Makefile.in +9 -6
  60. data/ext/ffi_c/libffi/doc/libffi.texi +82 -33
  61. data/ext/ffi_c/libffi/doc/version.texi +4 -4
  62. data/ext/ffi_c/libffi/fficonfig.h.in +12 -47
  63. data/ext/ffi_c/libffi/generate-darwin-source-and-headers.py +163 -52
  64. data/ext/ffi_c/libffi/include/Makefile.am +1 -1
  65. data/ext/ffi_c/libffi/include/Makefile.in +10 -9
  66. data/ext/ffi_c/libffi/include/ffi.h.in +54 -50
  67. data/ext/ffi_c/libffi/include/ffi_cfi.h +21 -0
  68. data/ext/ffi_c/libffi/include/ffi_common.h +29 -0
  69. data/ext/ffi_c/libffi/include/tramp.h +45 -0
  70. data/ext/ffi_c/libffi/libtool-version +2 -2
  71. data/ext/ffi_c/libffi/ltmain.sh +512 -315
  72. data/ext/ffi_c/libffi/m4/ax_cc_maxopt.m4 +18 -14
  73. data/ext/ffi_c/libffi/m4/ax_cflags_warn_all.m4 +108 -72
  74. data/ext/ffi_c/libffi/m4/ax_compiler_vendor.m4 +76 -45
  75. data/ext/ffi_c/libffi/m4/ax_prepend_flag.m4 +51 -0
  76. data/ext/ffi_c/libffi/man/Makefile.in +9 -6
  77. data/ext/ffi_c/libffi/missing +1 -1
  78. data/ext/ffi_c/libffi/msvc_build/aarch64/aarch64_include/ffi.h +1 -1
  79. data/ext/ffi_c/libffi/msvcc.sh +1 -1
  80. data/ext/ffi_c/libffi/src/aarch64/ffi.c +146 -42
  81. data/ext/ffi_c/libffi/src/aarch64/internal.h +32 -0
  82. data/ext/ffi_c/libffi/src/aarch64/sysv.S +134 -42
  83. data/ext/ffi_c/libffi/src/arc/arcompact.S +169 -94
  84. data/ext/ffi_c/libffi/src/arc/ffi.c +325 -148
  85. data/ext/ffi_c/libffi/src/arc/ffitarget.h +14 -0
  86. data/ext/ffi_c/libffi/src/arm/ffi.c +62 -17
  87. data/ext/ffi_c/libffi/src/arm/ffitarget.h +3 -3
  88. data/ext/ffi_c/libffi/src/arm/internal.h +10 -0
  89. data/ext/ffi_c/libffi/src/arm/sysv.S +113 -42
  90. data/ext/ffi_c/libffi/src/closures.c +133 -47
  91. data/ext/ffi_c/libffi/src/dlmalloc.c +5 -0
  92. data/ext/ffi_c/libffi/src/ia64/ffi.c +12 -0
  93. data/ext/ffi_c/libffi/src/ia64/unix.S +20 -2
  94. data/ext/ffi_c/libffi/src/loongarch64/ffi.c +621 -0
  95. data/ext/ffi_c/libffi/src/loongarch64/ffitarget.h +82 -0
  96. data/ext/ffi_c/libffi/src/loongarch64/sysv.S +327 -0
  97. data/ext/ffi_c/libffi/src/m32r/ffi.c +31 -14
  98. data/ext/ffi_c/libffi/src/mips/ffi.c +240 -65
  99. data/ext/ffi_c/libffi/src/mips/ffitarget.h +7 -0
  100. data/ext/ffi_c/libffi/src/mips/n32.S +137 -28
  101. data/ext/ffi_c/libffi/src/mips/o32.S +61 -4
  102. data/ext/ffi_c/libffi/src/moxie/ffi.c +47 -22
  103. data/ext/ffi_c/libffi/src/or1k/ffi.c +25 -12
  104. data/ext/ffi_c/libffi/src/pa/ffi.c +32 -33
  105. data/ext/ffi_c/libffi/src/pa/ffi64.c +614 -0
  106. data/ext/ffi_c/libffi/src/pa/ffitarget.h +22 -8
  107. data/ext/ffi_c/libffi/src/pa/hpux32.S +83 -36
  108. data/ext/ffi_c/libffi/src/pa/hpux64.S +681 -0
  109. data/ext/ffi_c/libffi/src/pa/linux.S +82 -35
  110. data/ext/ffi_c/libffi/src/powerpc/ffi_linux64.c +1 -1
  111. data/ext/ffi_c/libffi/src/powerpc/linux64.S +2 -0
  112. data/ext/ffi_c/libffi/src/powerpc/linux64_closure.S +2 -0
  113. data/ext/ffi_c/libffi/src/powerpc/t-aix +5 -0
  114. data/ext/ffi_c/libffi/src/prep_cif.c +22 -2
  115. data/ext/ffi_c/libffi/src/riscv/ffi.c +37 -4
  116. data/ext/ffi_c/libffi/src/sparc/ffi64.c +16 -0
  117. data/ext/ffi_c/libffi/src/tramp.c +716 -0
  118. data/ext/ffi_c/libffi/src/wasm32/ffi.c +934 -0
  119. data/ext/ffi_c/libffi/src/wasm32/ffitarget.h +62 -0
  120. data/ext/ffi_c/libffi/src/x86/ffi.c +99 -37
  121. data/ext/ffi_c/libffi/src/x86/ffi64.c +67 -12
  122. data/ext/ffi_c/libffi/src/x86/ffitarget.h +9 -5
  123. data/ext/ffi_c/libffi/src/x86/ffiw64.c +43 -0
  124. data/ext/ffi_c/libffi/src/x86/internal.h +14 -0
  125. data/ext/ffi_c/libffi/src/x86/internal64.h +14 -0
  126. data/ext/ffi_c/libffi/src/x86/sysv.S +172 -38
  127. data/ext/ffi_c/libffi/src/x86/sysv_intel.S +91 -88
  128. data/ext/ffi_c/libffi/src/x86/unix64.S +96 -6
  129. data/ext/ffi_c/libffi/src/x86/win64.S +20 -7
  130. data/ext/ffi_c/libffi/src/xtensa/ffi.c +16 -8
  131. data/ext/ffi_c/libffi/src/xtensa/ffitarget.h +4 -0
  132. data/ext/ffi_c/libffi/src/xtensa/sysv.S +26 -16
  133. data/ext/ffi_c/libffi/testsuite/Makefile.am +127 -114
  134. data/ext/ffi_c/libffi/testsuite/Makefile.in +136 -120
  135. data/ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh +54 -0
  136. data/ext/ffi_c/libffi/testsuite/emscripten/build.sh +63 -0
  137. data/ext/ffi_c/libffi/testsuite/emscripten/conftest.py +80 -0
  138. data/ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh +48 -0
  139. data/ext/ffi_c/libffi/testsuite/emscripten/test.html +7 -0
  140. data/ext/ffi_c/libffi/testsuite/emscripten/test_libffi.py +51 -0
  141. data/ext/ffi_c/libffi/testsuite/lib/libffi.exp +43 -21
  142. data/ext/ffi_c/libffi/testsuite/lib/target-libpath.exp +2 -2
  143. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/test-call.c +1 -0
  144. data/ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c +5 -1
  145. data/ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c +41 -0
  146. data/ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h +28 -3
  147. data/ext/ffi_c/libffi/testsuite/libffi.call/float_va.c +3 -0
  148. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ll1.c +5 -0
  149. data/ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c +4 -0
  150. data/ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c +4 -0
  151. data/ext/ffi_c/libffi/testsuite/libffi.call/s55.c +60 -0
  152. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen.c +8 -9
  153. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c +2 -2
  154. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c +2 -2
  155. data/ext/ffi_c/libffi/testsuite/libffi.call/strlen4.c +2 -2
  156. data/ext/ffi_c/libffi/testsuite/libffi.call/struct10.c +1 -1
  157. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_2.c +63 -0
  158. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3.c +65 -0
  159. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3f.c +65 -0
  160. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4.c +67 -0
  161. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c +67 -0
  162. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c +93 -0
  163. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c +61 -0
  164. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c +63 -0
  165. data/ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c +90 -0
  166. data/ext/ffi_c/libffi/testsuite/libffi.call/va_1.c +1 -119
  167. data/ext/ffi_c/libffi/testsuite/libffi.call/va_2.c +220 -0
  168. data/ext/ffi_c/libffi/testsuite/libffi.call/va_3.c +154 -0
  169. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c +13 -0
  170. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c +11 -0
  171. data/ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c +15 -0
  172. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn0.c +3 -2
  173. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn1.c +2 -0
  174. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn2.c +2 -0
  175. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn3.c +21 -1
  176. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn4.c +2 -0
  177. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn5.c +2 -0
  178. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_fn6.c +2 -0
  179. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_loc_fn0.c +7 -6
  180. data/ext/ffi_c/libffi/testsuite/libffi.closures/closure_simple.c +6 -0
  181. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_12byte.c +18 -0
  182. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_16byte.c +22 -0
  183. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_18byte.c +24 -0
  184. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_19byte.c +29 -0
  185. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_1_1byte.c +4 -0
  186. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte.c +19 -1
  187. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_20byte1.c +21 -1
  188. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_24byte.c +35 -3
  189. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_2byte.c +13 -0
  190. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3_1byte.c +19 -0
  191. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte1.c +13 -0
  192. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3byte2.c +13 -0
  193. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_3float.c +18 -0
  194. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4_1byte.c +22 -0
  195. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_4byte.c +13 -0
  196. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5_1_byte.c +29 -1
  197. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_5byte.c +19 -1
  198. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_64byte.c +24 -0
  199. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6_1_byte.c +28 -1
  200. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_6byte.c +24 -2
  201. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7_1_byte.c +39 -1
  202. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_7byte.c +25 -1
  203. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_8byte.c +14 -0
  204. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte1.c +14 -1
  205. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_9byte2.c +14 -2
  206. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_double.c +19 -1
  207. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_float.c +19 -1
  208. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble.c +20 -1
  209. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split.c +40 -25
  210. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_longdouble_split2.c +40 -3
  211. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_pointer.c +19 -1
  212. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint16.c +18 -1
  213. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint32.c +18 -3
  214. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_sint64.c +18 -1
  215. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint16.c +18 -1
  216. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint32.c +19 -1
  217. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_align_uint64.c +19 -1
  218. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_dbls_struct.c +3 -1
  219. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_double_va.c +9 -1
  220. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_float.c +4 -0
  221. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble.c +11 -1
  222. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_longdouble_va.c +22 -3
  223. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_schar.c +5 -1
  224. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshort.c +6 -1
  225. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_sshortchar.c +9 -1
  226. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_uchar.c +9 -1
  227. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushort.c +6 -2
  228. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_multi_ushortchar.c +9 -1
  229. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer.c +5 -0
  230. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_pointer_stack.c +10 -0
  231. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_schar.c +3 -0
  232. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sint.c +2 -0
  233. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_sshort.c +3 -0
  234. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c +11 -0
  235. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar.c +3 -0
  236. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint.c +4 -0
  237. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c +4 -0
  238. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c +4 -0
  239. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulonglong.c +2 -0
  240. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort.c +3 -0
  241. data/ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h +1 -138
  242. data/ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c +21 -21
  243. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct.c +32 -9
  244. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct1.c +1 -1
  245. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct10.c +12 -0
  246. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c +21 -5
  247. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct12.c +86 -0
  248. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct13.c +115 -0
  249. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct2.c +10 -1
  250. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct3.c +10 -1
  251. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct4.c +9 -0
  252. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct5.c +9 -0
  253. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct6.c +11 -0
  254. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct7.c +9 -0
  255. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct8.c +11 -0
  256. data/ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct9.c +11 -0
  257. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs1.c +86 -0
  258. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs2.c +102 -0
  259. data/ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs3.c +101 -0
  260. data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium.c +1 -1
  261. data/ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium2.c +1 -1
  262. data/ext/ffi_c/libffi/testsuite/libffi.closures/testclosure.c +6 -1
  263. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest.cc +2 -1
  264. data/ext/ffi_c/libffi/testsuite/libffi.closures/unwindtest_ffi_call.cc +1 -0
  265. data/ext/ffi_c/libffi.bsd.mk +2 -2
  266. data/ext/ffi_c/libffi.gnu.mk +2 -2
  267. data/ext/ffi_c/rbffi.h +1 -1
  268. data/ffi.gemspec +3 -3
  269. data/lib/ffi/autopointer.rb +7 -22
  270. data/lib/ffi/compat.rb +43 -0
  271. data/lib/ffi/data_converter.rb +2 -2
  272. data/lib/ffi/dynamic_library.rb +89 -0
  273. data/lib/ffi/enum.rb +18 -11
  274. data/lib/ffi/ffi.rb +3 -0
  275. data/lib/ffi/function.rb +71 -0
  276. data/lib/ffi/library.rb +55 -71
  277. data/lib/ffi/library_path.rb +109 -0
  278. data/lib/ffi/managedstruct.rb +1 -1
  279. data/lib/ffi/platform/aarch64-windows/types.conf +52 -0
  280. data/lib/ffi/platform/hppa1.1-linux/types.conf +178 -0
  281. data/lib/ffi/platform/hppa2.0-linux/types.conf +178 -0
  282. data/lib/ffi/platform/loongarch64-linux/types.conf +141 -0
  283. data/lib/ffi/platform/sw_64-linux/types.conf +141 -0
  284. data/lib/ffi/platform.rb +15 -13
  285. data/lib/ffi/struct.rb +2 -1
  286. data/lib/ffi/struct_layout.rb +1 -1
  287. data/lib/ffi/struct_layout_builder.rb +1 -1
  288. data/lib/ffi/tools/const_generator.rb +5 -4
  289. data/lib/ffi/types.rb +32 -6
  290. data/lib/ffi/variadic.rb +19 -8
  291. data/lib/ffi/version.rb +1 -1
  292. data/rakelib/ffi_gem_helper.rb +1 -1
  293. data/samples/hello_ractor.rb +11 -0
  294. data/samples/qsort_ractor.rb +28 -0
  295. data.tar.gz.sig +0 -0
  296. metadata +103 -28
  297. metadata.gz.sig +0 -0
  298. data/ext/ffi_c/libffi/.travis/build-cross-in-container.sh +0 -14
  299. data/ext/ffi_c/libffi/.travis/build.sh +0 -142
  300. data/ext/ffi_c/libffi/.travis.yml +0 -83
  301. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar_va.c +0 -44
  302. data/ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort_va.c +0 -44
  303. /data/ext/ffi_c/libffi/{.travis → .ci}/ar-lib +0 -0
  304. /data/ext/ffi_c/libffi/{.travis → .ci}/bfin-sim.exp +0 -0
  305. /data/ext/ffi_c/libffi/{.travis → .ci}/compile +0 -0
  306. /data/ext/ffi_c/libffi/{.travis → .ci}/m32r-sim.exp +0 -0
  307. /data/ext/ffi_c/libffi/{.travis → .ci}/moxie-sim.exp +0 -0
  308. /data/ext/ffi_c/libffi/{.travis → .ci}/or1k-sim.exp +0 -0
  309. /data/ext/ffi_c/libffi/{.travis → .ci}/powerpc-eabisim.exp +0 -0
  310. /data/ext/ffi_c/libffi/{.travis → .ci}/wine-sim.exp +0 -0
  311. /data/ext/ffi_c/libffi/testsuite/libffi.call/{pyobjc-tc.c → pyobjc_tc.c} +0 -0
  312. /data/lib/ffi/platform/{sparc64-linux → sparcv9-linux}/types.conf +0 -0
data/lib/ffi/types.rb CHANGED
@@ -33,12 +33,24 @@
33
33
  # see {file:README}
34
34
  module FFI
35
35
 
36
+ unless defined?(self.custom_typedefs)
37
+ # Truffleruby and JRuby don't support Ractor so far.
38
+ # So they don't need separation between builtin and custom types.
39
+ def self.custom_typedefs
40
+ TypeDefs
41
+ end
42
+ writable_typemap = true
43
+ end
44
+
36
45
  # @param [Type, DataConverter, Symbol] old type definition used by {FFI.find_type}
37
46
  # @param [Symbol] add new type definition's name to add
38
47
  # @return [Type]
39
48
  # Add a definition type to type definitions.
49
+ #
50
+ # The type definition is local per Ractor.
40
51
  def self.typedef(old, add)
41
- TypeDefs[add] = self.find_type(old)
52
+ tm = custom_typedefs
53
+ tm[add] = self.find_type(old)
42
54
  end
43
55
 
44
56
  # (see FFI.typedef)
@@ -46,6 +58,14 @@ module FFI
46
58
  typedef old, add
47
59
  end
48
60
 
61
+ class << self
62
+ private def __typedef(old, add)
63
+ TypeDefs[add] = self.find_type(old)
64
+ end
65
+
66
+ private :custom_typedefs
67
+ end
68
+
49
69
 
50
70
  # @param [Type, DataConverter, Symbol] name
51
71
  # @param [Hash] type_map if nil, {FFI::TypeDefs} is used
@@ -57,14 +77,18 @@ module FFI
57
77
  if name.is_a?(Type)
58
78
  name
59
79
 
60
- elsif type_map && type_map.has_key?(name)
80
+ elsif type_map&.has_key?(name)
61
81
  type_map[name]
62
82
 
83
+ elsif (tm=custom_typedefs).has_key?(name)
84
+ tm[name]
85
+
63
86
  elsif TypeDefs.has_key?(name)
64
87
  TypeDefs[name]
65
88
 
66
89
  elsif name.is_a?(DataConverter)
67
- (type_map || TypeDefs)[name] = Type::Mapped.new(name)
90
+ tm = (type_map || custom_typedefs)
91
+ tm[name] = Type::Mapped.new(name)
68
92
  else
69
93
  raise TypeError, "unable to resolve type '#{name}'"
70
94
  end
@@ -168,7 +192,7 @@ module FFI
168
192
  end
169
193
  end
170
194
 
171
- typedef(StrPtrConverter, :strptr)
195
+ __typedef(StrPtrConverter, :strptr)
172
196
 
173
197
  # @param type +type+ is an instance of class accepted by {FFI.find_type}
174
198
  # @return [Numeric]
@@ -184,11 +208,13 @@ module FFI
184
208
  f.each_line { |line|
185
209
  if line.index(prefix) == 0
186
210
  new_type, orig_type = line.chomp.slice(prefix.length..-1).split(/\s*=\s*/)
187
- typedef(orig_type.to_sym, new_type.to_sym)
211
+ __typedef(orig_type.to_sym, new_type.to_sym)
188
212
  end
189
213
  }
190
214
  end
191
- typedef :pointer, :caddr_t
215
+ __typedef :pointer, :caddr_t
192
216
  rescue Errno::ENOENT
193
217
  end
218
+
219
+ FFI.make_shareable(TypeDefs) unless writable_typemap
194
220
  end
data/lib/ffi/variadic.rb CHANGED
@@ -54,16 +54,27 @@ module FFI
54
54
  invoker = self
55
55
  params = "*args"
56
56
  call = "call"
57
- mod.module_eval <<-code
58
- @@#{mname} = invoker
59
- def self.#{mname}(#{params})
60
- @@#{mname}.#{call}(#{params})
61
- end
62
- def #{mname}(#{params})
63
- @@#{mname}.#{call}(#{params})
64
- end
57
+ mname = mname.to_sym
58
+ mod.module_eval <<-code, __FILE__, __LINE__
59
+ @ffi_functions = {} unless defined?(@ffi_functions)
60
+ @ffi_functions[#{mname.inspect}] = invoker
61
+
62
+ def self.#{mname}(#{params})
63
+ @ffi_functions[#{mname.inspect}].#{call}(#{params})
64
+ end
65
+
66
+ define_method(#{mname.inspect}, &method(#{mname.inspect}))
65
67
  code
66
68
  invoker
67
69
  end
70
+
71
+ # Retrieve Array of parameter types
72
+ #
73
+ # This method returns an Array of FFI types accepted as function parameters.
74
+ #
75
+ # @return [Array<FFI::Type>]
76
+ def param_types
77
+ [*@fixed, Type::Builtin::VARARGS]
78
+ end
68
79
  end
69
80
  end
data/lib/ffi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FFI
2
- VERSION = '1.15.4'
2
+ VERSION = '1.16.3'
3
3
  end
@@ -13,7 +13,7 @@ class FfiGemHelper < Bundler::GemHelper
13
13
  update_history
14
14
  end
15
15
 
16
- task "release:rubygem_push" => ["gem:windows", "gem:java"]
16
+ task "release:rubygem_push" => ["gem:native", "gem:java"]
17
17
  end
18
18
 
19
19
  def hfile
@@ -0,0 +1,11 @@
1
+ require 'ffi'
2
+
3
+ module Foo
4
+ extend FFI::Library
5
+ ffi_lib FFI::Library::LIBC
6
+ attach_function("cputs", "puts", [ :string ], :int)
7
+ freeze
8
+ end
9
+ Ractor.new do
10
+ Foo.cputs("Hello, World via libc puts using FFI in a Ractor")
11
+ end.take
@@ -0,0 +1,28 @@
1
+ require 'ffi'
2
+
3
+ module LibC
4
+ extend FFI::Library
5
+ ffi_lib FFI::Library::LIBC
6
+ callback :qsort_cmp, [ :pointer, :pointer ], :int
7
+ attach_function :qsort, [ :pointer, :ulong, :ulong, :qsort_cmp ], :int
8
+
9
+ freeze # Freeze the module variables, so that it can be shared across ractors.
10
+ end
11
+
12
+ p = FFI::MemoryPointer.new(:int, 3)
13
+ p.put_array_of_int32(0, [ 2, 3, 1 ]) # Write some unsorted data into the memory
14
+ # Ractor.make_shareable(p) # freeze the pointer to be shared between ractors instead of copied
15
+ puts "main -ptr=#{p.inspect}"
16
+ res = Ractor.new(p) do |p|
17
+ puts "ractor-ptr=#{p.inspect}"
18
+ puts "Before qsort #{p.get_array_of_int32(0, 3).join(', ')}"
19
+ LibC.qsort(p, 3, 4) do |p1, p2|
20
+ i1 = p1.get_int32(0)
21
+ i2 = p2.get_int32(0)
22
+ puts "In block: comparing #{i1} and #{i2}"
23
+ i1 < i2 ? -1 : i1 > i2 ? 1 : 0
24
+ end
25
+ puts "After qsort #{p.get_array_of_int32(0, 3).join(', ')}"
26
+ end.take
27
+
28
+ puts "After ractor termination #{p.get_array_of_int32(0, 3).join(', ')}"
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,39 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.4
4
+ version: 1.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wayne Meissner
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2021-09-01 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIEBDCCAmygAwIBAgIBAjANBgkqhkiG9w0BAQsFADAoMSYwJAYDVQQDDB1sYXJz
14
+ L0RDPWdyZWl6LXJlaW5zZG9yZi9EQz1kZTAeFw0yMzAyMTUxNzQxMTVaFw0yNDAy
15
+ MTUxNzQxMTVaMCgxJjAkBgNVBAMMHWxhcnMvREM9Z3JlaXotcmVpbnNkb3JmL0RD
16
+ PWRlMIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwum6Y1KznfpzXOT/
17
+ mZgJTBbxZuuZF49Fq3K0WA67YBzNlDv95qzSp7V/7Ek3NCcnT7G+2kSuhNo1FhdN
18
+ eSDO/moYebZNAcu3iqLsuzuULXPLuoU0GsMnVMqV9DZPh7cQHE5EBZ7hlzDBK7k/
19
+ 8nBMvR0mHo77kIkapHc26UzVq/G0nKLfDsIHXVylto3PjzOumjG6GhmFN4r3cP6e
20
+ SDfl1FSeRYVpt4kmQULz/zdSaOH3AjAq7PM2Z91iGwQvoUXMANH2v89OWjQO/NHe
21
+ JMNDFsmHK/6Ji4Kk48Z3TyscHQnipAID5GhS1oD21/WePdj7GhmbF5gBzkV5uepd
22
+ eJQPgWGwrQW/Z2oPjRuJrRofzWfrMWqbOahj9uth6WSxhNexUtbjk6P8emmXOJi5
23
+ chQPnWX+N3Gj+jjYxqTFdwT7Mj3pv1VHa+aNUbqSPpvJeDyxRIuo9hvzDaBHb/Cg
24
+ 9qRVcm8a96n4t7y2lrX1oookY6bkBaxWOMtWlqIprq8JZXM9AgMBAAGjOTA3MAkG
25
+ A1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBQ4h1tIyvdUWtMI739xMzTR
26
+ 7EfMFzANBgkqhkiG9w0BAQsFAAOCAYEAQAcuTARfiiVUVx5KURICfdTM2Kd7LhOn
27
+ qt3Vs4ANGvT226LEp3RnQ+kWGQYMRb3cw3LY2TNQRPlnZxE994mgjBscN4fbjXqO
28
+ T0JbVpeszRZa5k1goggbnWT7CO7yU7WcHh13DaSubY7HUpAJn2xz9w2stxQfN/EE
29
+ VMlnDJ1P7mUHAvpK8X9j9h7Xlc1niViT18MYwux8mboVTryrLr+clATUkkM3yBF0
30
+ RV+c34ReW5eXO9Tr6aKTxh/pFC9ggDT6jOxuJgSvG8HWJzVf4NDvMavIas4KYjiI
31
+ BU6CpWaG5NxicqL3BERi52U43HV08br+LNVpb7Rekgve/PJuSFnAR015bhSRXe5U
32
+ vBioD1qW2ZW9tXg8Ww2IfDaO5a1So5Xby51rhNlyo6ATj2NkuLWZUKPKHhAz0TKm
33
+ Dzx/gFSOrRoCt2mXNgrmcAfr386AfaMvCh7cXqdxZwmVo7ILZCYXck0pajvubsDd
34
+ NUIIFkVXvd1odFyK9LF1RFAtxn/iAmpx
35
+ -----END CERTIFICATE-----
36
+ date: 2023-10-04 00:00:00.000000000 Z
12
37
  dependencies:
13
38
  - !ruby/object:Gem::Dependency
14
39
  name: rake
@@ -30,14 +55,14 @@ dependencies:
30
55
  requirements:
31
56
  - - "~>"
32
57
  - !ruby/object:Gem::Version
33
- version: '1.0'
58
+ version: '1.1'
34
59
  type: :development
35
60
  prerelease: false
36
61
  version_requirements: !ruby/object:Gem::Requirement
37
62
  requirements:
38
63
  - - "~>"
39
64
  - !ruby/object:Gem::Version
40
- version: '1.0'
65
+ version: '1.1'
41
66
  - !ruby/object:Gem::Dependency
42
67
  name: rake-compiler-dock
43
68
  requirement: !ruby/object:Gem::Requirement
@@ -130,23 +155,28 @@ files:
130
155
  - ext/ffi_c/libffi.vc.mk
131
156
  - ext/ffi_c/libffi.vc64.mk
132
157
  - ext/ffi_c/libffi/.appveyor.yml
158
+ - ext/ffi_c/libffi/.appveyor/site.exp
159
+ - ext/ffi_c/libffi/.appveyor/unix-noexec.exp
160
+ - ext/ffi_c/libffi/.ci/ar-lib
161
+ - ext/ffi_c/libffi/.ci/bfin-sim.exp
162
+ - ext/ffi_c/libffi/.ci/build-cross-in-container.sh
163
+ - ext/ffi_c/libffi/.ci/build-in-container.sh
164
+ - ext/ffi_c/libffi/.ci/build.sh
165
+ - ext/ffi_c/libffi/.ci/compile
166
+ - ext/ffi_c/libffi/.ci/install.sh
167
+ - ext/ffi_c/libffi/.ci/m32r-sim.exp
168
+ - ext/ffi_c/libffi/.ci/moxie-sim.exp
169
+ - ext/ffi_c/libffi/.ci/msvs-detect
170
+ - ext/ffi_c/libffi/.ci/or1k-sim.exp
171
+ - ext/ffi_c/libffi/.ci/powerpc-eabisim.exp
172
+ - ext/ffi_c/libffi/.ci/site.exp
173
+ - ext/ffi_c/libffi/.ci/wine-sim.exp
174
+ - ext/ffi_c/libffi/.circleci/config.yml
133
175
  - ext/ffi_c/libffi/.gitattributes
134
176
  - ext/ffi_c/libffi/.github/issue_template.md
177
+ - ext/ffi_c/libffi/.github/workflows/build.yml
178
+ - ext/ffi_c/libffi/.github/workflows/emscripten.yml
135
179
  - ext/ffi_c/libffi/.gitignore
136
- - ext/ffi_c/libffi/.travis.yml
137
- - ext/ffi_c/libffi/.travis/ar-lib
138
- - ext/ffi_c/libffi/.travis/bfin-sim.exp
139
- - ext/ffi_c/libffi/.travis/build-cross-in-container.sh
140
- - ext/ffi_c/libffi/.travis/build-in-container.sh
141
- - ext/ffi_c/libffi/.travis/build.sh
142
- - ext/ffi_c/libffi/.travis/compile
143
- - ext/ffi_c/libffi/.travis/install.sh
144
- - ext/ffi_c/libffi/.travis/m32r-sim.exp
145
- - ext/ffi_c/libffi/.travis/moxie-sim.exp
146
- - ext/ffi_c/libffi/.travis/or1k-sim.exp
147
- - ext/ffi_c/libffi/.travis/powerpc-eabisim.exp
148
- - ext/ffi_c/libffi/.travis/site.exp
149
- - ext/ffi_c/libffi/.travis/wine-sim.exp
150
180
  - ext/ffi_c/libffi/ChangeLog.old
151
181
  - ext/ffi_c/libffi/LICENSE
152
182
  - ext/ffi_c/libffi/LICENSE-BUILDTOOLS
@@ -155,6 +185,7 @@ files:
155
185
  - ext/ffi_c/libffi/README.md
156
186
  - ext/ffi_c/libffi/acinclude.m4
157
187
  - ext/ffi_c/libffi/autogen.sh
188
+ - ext/ffi_c/libffi/compile
158
189
  - ext/ffi_c/libffi/config.guess
159
190
  - ext/ffi_c/libffi/config.sub
160
191
  - ext/ffi_c/libffi/configure
@@ -171,6 +202,7 @@ files:
171
202
  - ext/ffi_c/libffi/include/ffi.h.in
172
203
  - ext/ffi_c/libffi/include/ffi_cfi.h
173
204
  - ext/ffi_c/libffi/include/ffi_common.h
205
+ - ext/ffi_c/libffi/include/tramp.h
174
206
  - ext/ffi_c/libffi/install-sh
175
207
  - ext/ffi_c/libffi/libffi.map.in
176
208
  - ext/ffi_c/libffi/libffi.pc.in
@@ -188,6 +220,7 @@ files:
188
220
  - ext/ffi_c/libffi/m4/ax_enable_builddir.m4
189
221
  - ext/ffi_c/libffi/m4/ax_gcc_archflag.m4
190
222
  - ext/ffi_c/libffi/m4/ax_gcc_x86_cpuid.m4
223
+ - ext/ffi_c/libffi/m4/ax_prepend_flag.m4
191
224
  - ext/ffi_c/libffi/m4/ax_require_defined.m4
192
225
  - ext/ffi_c/libffi/make_sunver.pl
193
226
  - ext/ffi_c/libffi/man/Makefile.am
@@ -248,6 +281,9 @@ files:
248
281
  - ext/ffi_c/libffi/src/kvx/ffi.c
249
282
  - ext/ffi_c/libffi/src/kvx/ffitarget.h
250
283
  - ext/ffi_c/libffi/src/kvx/sysv.S
284
+ - ext/ffi_c/libffi/src/loongarch64/ffi.c
285
+ - ext/ffi_c/libffi/src/loongarch64/ffitarget.h
286
+ - ext/ffi_c/libffi/src/loongarch64/sysv.S
251
287
  - ext/ffi_c/libffi/src/m32r/ffi.c
252
288
  - ext/ffi_c/libffi/src/m32r/ffitarget.h
253
289
  - ext/ffi_c/libffi/src/m32r/sysv.S
@@ -277,8 +313,10 @@ files:
277
313
  - ext/ffi_c/libffi/src/or1k/ffitarget.h
278
314
  - ext/ffi_c/libffi/src/or1k/sysv.S
279
315
  - ext/ffi_c/libffi/src/pa/ffi.c
316
+ - ext/ffi_c/libffi/src/pa/ffi64.c
280
317
  - ext/ffi_c/libffi/src/pa/ffitarget.h
281
318
  - ext/ffi_c/libffi/src/pa/hpux32.S
319
+ - ext/ffi_c/libffi/src/pa/hpux64.S
282
320
  - ext/ffi_c/libffi/src/pa/linux.S
283
321
  - ext/ffi_c/libffi/src/powerpc/aix.S
284
322
  - ext/ffi_c/libffi/src/powerpc/aix_closure.S
@@ -295,6 +333,7 @@ files:
295
333
  - ext/ffi_c/libffi/src/powerpc/linux64_closure.S
296
334
  - ext/ffi_c/libffi/src/powerpc/ppc_closure.S
297
335
  - ext/ffi_c/libffi/src/powerpc/sysv.S
336
+ - ext/ffi_c/libffi/src/powerpc/t-aix
298
337
  - ext/ffi_c/libffi/src/prep_cif.c
299
338
  - ext/ffi_c/libffi/src/raw_api.c
300
339
  - ext/ffi_c/libffi/src/riscv/ffi.c
@@ -319,10 +358,13 @@ files:
319
358
  - ext/ffi_c/libffi/src/tile/ffi.c
320
359
  - ext/ffi_c/libffi/src/tile/ffitarget.h
321
360
  - ext/ffi_c/libffi/src/tile/tile.S
361
+ - ext/ffi_c/libffi/src/tramp.c
322
362
  - ext/ffi_c/libffi/src/types.c
323
363
  - ext/ffi_c/libffi/src/vax/elfbsd.S
324
364
  - ext/ffi_c/libffi/src/vax/ffi.c
325
365
  - ext/ffi_c/libffi/src/vax/ffitarget.h
366
+ - ext/ffi_c/libffi/src/wasm32/ffi.c
367
+ - ext/ffi_c/libffi/src/wasm32/ffitarget.h
326
368
  - ext/ffi_c/libffi/src/x86/asmnames.h
327
369
  - ext/ffi_c/libffi/src/x86/ffi.c
328
370
  - ext/ffi_c/libffi/src/x86/ffi64.c
@@ -342,6 +384,12 @@ files:
342
384
  - ext/ffi_c/libffi/testsuite/Makefile.am
343
385
  - ext/ffi_c/libffi/testsuite/Makefile.in
344
386
  - ext/ffi_c/libffi/testsuite/config/default.exp
387
+ - ext/ffi_c/libffi/testsuite/emscripten/build-tests.sh
388
+ - ext/ffi_c/libffi/testsuite/emscripten/build.sh
389
+ - ext/ffi_c/libffi/testsuite/emscripten/conftest.py
390
+ - ext/ffi_c/libffi/testsuite/emscripten/node-tests.sh
391
+ - ext/ffi_c/libffi/testsuite/emscripten/test.html
392
+ - ext/ffi_c/libffi/testsuite/emscripten/test_libffi.py
345
393
  - ext/ffi_c/libffi/testsuite/lib/libffi.exp
346
394
  - ext/ffi_c/libffi/testsuite/lib/target-libpath.exp
347
395
  - ext/ffi_c/libffi/testsuite/lib/wrapper.exp
@@ -354,6 +402,7 @@ files:
354
402
  - ext/ffi_c/libffi/testsuite/libffi.bhaible/testcases.c
355
403
  - ext/ffi_c/libffi/testsuite/libffi.call/align_mixed.c
356
404
  - ext/ffi_c/libffi/testsuite/libffi.call/align_stdcall.c
405
+ - ext/ffi_c/libffi/testsuite/libffi.call/bpo_38748.c
357
406
  - ext/ffi_c/libffi/testsuite/libffi.call/call.exp
358
407
  - ext/ffi_c/libffi/testsuite/libffi.call/err_bad_typedef.c
359
408
  - ext/ffi_c/libffi/testsuite/libffi.call/ffitest.h
@@ -371,7 +420,7 @@ files:
371
420
  - ext/ffi_c/libffi/testsuite/libffi.call/offsets.c
372
421
  - ext/ffi_c/libffi/testsuite/libffi.call/pr1172638.c
373
422
  - ext/ffi_c/libffi/testsuite/libffi.call/promotion.c
374
- - ext/ffi_c/libffi/testsuite/libffi.call/pyobjc-tc.c
423
+ - ext/ffi_c/libffi/testsuite/libffi.call/pyobjc_tc.c
375
424
  - ext/ffi_c/libffi/testsuite/libffi.call/return_dbl.c
376
425
  - ext/ffi_c/libffi/testsuite/libffi.call/return_dbl1.c
377
426
  - ext/ffi_c/libffi/testsuite/libffi.call/return_dbl2.c
@@ -386,6 +435,7 @@ files:
386
435
  - ext/ffi_c/libffi/testsuite/libffi.call/return_sl.c
387
436
  - ext/ffi_c/libffi/testsuite/libffi.call/return_uc.c
388
437
  - ext/ffi_c/libffi/testsuite/libffi.call/return_ul.c
438
+ - ext/ffi_c/libffi/testsuite/libffi.call/s55.c
389
439
  - ext/ffi_c/libffi/testsuite/libffi.call/strlen.c
390
440
  - ext/ffi_c/libffi/testsuite/libffi.call/strlen2.c
391
441
  - ext/ffi_c/libffi/testsuite/libffi.call/strlen3.c
@@ -400,8 +450,19 @@ files:
400
450
  - ext/ffi_c/libffi/testsuite/libffi.call/struct7.c
401
451
  - ext/ffi_c/libffi/testsuite/libffi.call/struct8.c
402
452
  - ext/ffi_c/libffi/testsuite/libffi.call/struct9.c
453
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_2.c
454
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3.c
455
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_3f.c
456
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4.c
457
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_4f.c
458
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_big.c
459
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_by_value_small.c
460
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_return_2H.c
461
+ - ext/ffi_c/libffi/testsuite/libffi.call/struct_return_8H.c
403
462
  - ext/ffi_c/libffi/testsuite/libffi.call/uninitialized.c
404
463
  - ext/ffi_c/libffi/testsuite/libffi.call/va_1.c
464
+ - ext/ffi_c/libffi/testsuite/libffi.call/va_2.c
465
+ - ext/ffi_c/libffi/testsuite/libffi.call/va_3.c
405
466
  - ext/ffi_c/libffi/testsuite/libffi.call/va_struct1.c
406
467
  - ext/ffi_c/libffi/testsuite/libffi.call/va_struct2.c
407
468
  - ext/ffi_c/libffi/testsuite/libffi.call/va_struct3.c
@@ -473,13 +534,11 @@ files:
473
534
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_sshort.c
474
535
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_struct_va1.c
475
536
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar.c
476
- - ext/ffi_c/libffi/testsuite/libffi.closures/cls_uchar_va.c
477
537
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint.c
478
538
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_uint_va.c
479
539
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulong_va.c
480
540
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_ulonglong.c
481
541
  - ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort.c
482
- - ext/ffi_c/libffi/testsuite/libffi.closures/cls_ushort_va.c
483
542
  - ext/ffi_c/libffi/testsuite/libffi.closures/err_bad_abi.c
484
543
  - ext/ffi_c/libffi/testsuite/libffi.closures/ffitest.h
485
544
  - ext/ffi_c/libffi/testsuite/libffi.closures/huge_struct.c
@@ -487,6 +546,8 @@ files:
487
546
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct1.c
488
547
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct10.c
489
548
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct11.c
549
+ - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct12.c
550
+ - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct13.c
490
551
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct2.c
491
552
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct3.c
492
553
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct4.c
@@ -496,6 +557,9 @@ files:
496
557
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct8.c
497
558
  - ext/ffi_c/libffi/testsuite/libffi.closures/nested_struct9.c
498
559
  - ext/ffi_c/libffi/testsuite/libffi.closures/problem1.c
560
+ - ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs1.c
561
+ - ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs2.c
562
+ - ext/ffi_c/libffi/testsuite/libffi.closures/single_entry_structs3.c
499
563
  - ext/ffi_c/libffi/testsuite/libffi.closures/stret_large.c
500
564
  - ext/ffi_c/libffi/testsuite/libffi.closures/stret_large2.c
501
565
  - ext/ffi_c/libffi/testsuite/libffi.closures/stret_medium.c
@@ -558,12 +622,16 @@ files:
558
622
  - lib/ffi/autopointer.rb
559
623
  - lib/ffi/buffer.rb
560
624
  - lib/ffi/callback.rb
625
+ - lib/ffi/compat.rb
561
626
  - lib/ffi/data_converter.rb
627
+ - lib/ffi/dynamic_library.rb
562
628
  - lib/ffi/enum.rb
563
629
  - lib/ffi/errno.rb
564
630
  - lib/ffi/ffi.rb
631
+ - lib/ffi/function.rb
565
632
  - lib/ffi/io.rb
566
633
  - lib/ffi/library.rb
634
+ - lib/ffi/library_path.rb
567
635
  - lib/ffi/managedstruct.rb
568
636
  - lib/ffi/memorypointer.rb
569
637
  - lib/ffi/platform.rb
@@ -572,9 +640,12 @@ files:
572
640
  - lib/ffi/platform/aarch64-freebsd12/types.conf
573
641
  - lib/ffi/platform/aarch64-linux/types.conf
574
642
  - lib/ffi/platform/aarch64-openbsd/types.conf
643
+ - lib/ffi/platform/aarch64-windows/types.conf
575
644
  - lib/ffi/platform/arm-freebsd/types.conf
576
645
  - lib/ffi/platform/arm-freebsd12/types.conf
577
646
  - lib/ffi/platform/arm-linux/types.conf
647
+ - lib/ffi/platform/hppa1.1-linux/types.conf
648
+ - lib/ffi/platform/hppa2.0-linux/types.conf
578
649
  - lib/ffi/platform/i386-cygwin/types.conf
579
650
  - lib/ffi/platform/i386-darwin/types.conf
580
651
  - lib/ffi/platform/i386-freebsd/types.conf
@@ -586,6 +657,7 @@ files:
586
657
  - lib/ffi/platform/i386-solaris/types.conf
587
658
  - lib/ffi/platform/i386-windows/types.conf
588
659
  - lib/ffi/platform/ia64-linux/types.conf
660
+ - lib/ffi/platform/loongarch64-linux/types.conf
589
661
  - lib/ffi/platform/mips-linux/types.conf
590
662
  - lib/ffi/platform/mips64-linux/types.conf
591
663
  - lib/ffi/platform/mips64el-linux/types.conf
@@ -605,9 +677,10 @@ files:
605
677
  - lib/ffi/platform/s390x-linux/types.conf
606
678
  - lib/ffi/platform/sparc-linux/types.conf
607
679
  - lib/ffi/platform/sparc-solaris/types.conf
608
- - lib/ffi/platform/sparc64-linux/types.conf
680
+ - lib/ffi/platform/sparcv9-linux/types.conf
609
681
  - lib/ffi/platform/sparcv9-openbsd/types.conf
610
682
  - lib/ffi/platform/sparcv9-solaris/types.conf
683
+ - lib/ffi/platform/sw_64-linux/types.conf
611
684
  - lib/ffi/platform/x86_64-cygwin/types.conf
612
685
  - lib/ffi/platform/x86_64-darwin/types.conf
613
686
  - lib/ffi/platform/x86_64-dragonflybsd/types.conf
@@ -639,9 +712,11 @@ files:
639
712
  - samples/getpid.rb
640
713
  - samples/gettimeofday.rb
641
714
  - samples/hello.rb
715
+ - samples/hello_ractor.rb
642
716
  - samples/inotify.rb
643
717
  - samples/pty.rb
644
718
  - samples/qsort.rb
719
+ - samples/qsort_ractor.rb
645
720
  homepage: https://github.com/ffi/ffi/wiki
646
721
  licenses:
647
722
  - BSD-3-Clause
@@ -652,7 +727,7 @@ metadata:
652
727
  wiki_uri: https://github.com/ffi/ffi/wiki
653
728
  source_code_uri: https://github.com/ffi/ffi/
654
729
  mailing_list_uri: http://groups.google.com/group/ruby-ffi
655
- post_install_message:
730
+ post_install_message:
656
731
  rdoc_options:
657
732
  - "--exclude=ext/ffi_c/.*\\.o$"
658
733
  - "--exclude=ffi_c\\.(bundle|so)$"
@@ -662,15 +737,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
662
737
  requirements:
663
738
  - - ">="
664
739
  - !ruby/object:Gem::Version
665
- version: '2.3'
740
+ version: '2.5'
666
741
  required_rubygems_version: !ruby/object:Gem::Requirement
667
742
  requirements:
668
743
  - - ">="
669
744
  - !ruby/object:Gem::Version
670
745
  version: '0'
671
746
  requirements: []
672
- rubygems_version: 3.2.3
673
- signing_key:
747
+ rubygems_version: 3.4.19
748
+ signing_key:
674
749
  specification_version: 4
675
750
  summary: Ruby FFI
676
751
  test_files: []
metadata.gz.sig ADDED
Binary file
@@ -1,14 +0,0 @@
1
- #!/bin/bash
2
-
3
- cd /opt
4
-
5
- echo $PATH
6
- export PATH=/usr/local/bin:$PATH
7
- echo $PATH
8
-
9
- ./configure --host=${HOST} || cat */config.log
10
- make
11
- make dist
12
- make check RUNTESTFLAGS="-a $RUNTESTFLAGS" || true
13
-
14
-