[前][次][番号順一覧][スレッド一覧]

ruby-changes:60297

From: Nobuyoshi <ko1@a...>
Date: Thu, 5 Mar 2020 11:31:54 +0900 (JST)
Subject: [ruby-changes:60297] 261569d4aa (master): [ruby/fiddle] always use ffi_closure_alloc on Windows

https://git.ruby-lang.org/ruby.git/commit/?id=261569d4aa

From 261569d4aac440f25de588cca365163ecf1124a2 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 5 Mar 2020 11:31:08 +0900
Subject: [ruby/fiddle] always use ffi_closure_alloc on Windows


diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index fae22e8..67ed080 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -116,7 +116,12 @@ if ver https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L116
   ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored.
   ver = (ver.split('.').map(&:to_i) + [0,0])[0,3]
   $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }})
-  $defs << "-DUSE_FFI_CLOSURE_ALLOC=1" if (ver <=> [3, 2]) >= 0
+end
+
+warn "libffi_version: #{ver}"
+case
+when $mswin, $minor, (ver && (ver <=> [3, 2]) >= 0)
+  $defs << "-DUSE_FFI_CLOSURE_ALLOC=1"
 end
 
 have_header 'sys/mman.h'
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]