summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSutou Kouhei <kou@clear-code.com>2020-12-22 14:56:47 +0900
committerSutou Kouhei <kou@cozmixng.org>2020-12-23 05:49:52 +0900
commit32849dc1bbc3296aa13f86a35468ce16f8c32aab (patch)
tree7514944bef7ac7ca41012b09135493edad7d1d7a /ext
parent228fa3ac6ec25eba5139674d04a74f07a34f2874 (diff)
fiddle: Update to 1.0.5
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3970
Diffstat (limited to 'ext')
-rw-r--r--ext/fiddle/extconf.rb6
-rw-r--r--ext/fiddle/function.c5
-rw-r--r--ext/fiddle/lib/fiddle/version.rb2
3 files changed, 8 insertions, 5 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index 7e92d6a2f7..6d1d5104a1 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -137,8 +137,10 @@ else
have_func('ffi_closure_alloc', ffi_header)
end
-if libffi
- $defs << "-DHAVE_FFI_PREP_CIF_VAR"
+if libffi_version
+ if (libffi_version <=> [3, 0, 11]) >= 0
+ $defs << "-DHAVE_FFI_PREP_CIF_VAR"
+ end
else
have_func('ffi_prep_cif_var', ffi_header)
end
diff --git a/ext/fiddle/function.c b/ext/fiddle/function.c
index afa95d7193..1d82bc8a3e 100644
--- a/ext/fiddle/function.c
+++ b/ext/fiddle/function.c
@@ -451,8 +451,9 @@ Init_fiddle_function(void)
* Caller must ensure the underlying function is called in a
* thread-safe manner if running in a multi-threaded process.
*
- * Note that many Ruby C-extension APIs are thread-safe to call
- * only when the Function is constructed with <code>need_gvl: true</code>.
+ * Note that it is not thread-safe to use this method to
+ * directly or indirectly call many Ruby C-extension APIs unless
+ * you don't pass +need_gvl: true+ to Fiddle::Function#new.
*
* For an example see Fiddle::Function
*
diff --git a/ext/fiddle/lib/fiddle/version.rb b/ext/fiddle/lib/fiddle/version.rb
index d8aef1a71b..1b6259f8e4 100644
--- a/ext/fiddle/lib/fiddle/version.rb
+++ b/ext/fiddle/lib/fiddle/version.rb
@@ -1,3 +1,3 @@
module Fiddle
- VERSION = "1.0.4"
+ VERSION = "1.0.5"
end