summaryrefslogtreecommitdiff
path: root/ext/fiddle
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fiddle')
-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