ruby-changes:60291
From: Nobuyoshi <ko1@a...>
Date: Wed, 4 Mar 2020 18:42:52 +0900 (JST)
Subject: [ruby-changes:60291] 95f387f61a (master): [ruby/fiddle] ffi_closure_free is available in the bundled libffi
https://git.ruby-lang.org/ruby.git/commit/?id=95f387f61a From 95f387f61a4a4ea92635da760b7de5b1e09bb84e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 4 Mar 2020 18:41:47 +0900 Subject: [ruby/fiddle] ffi_closure_free is available in the bundled libffi diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb index 915afb9..2d0e188 100644 --- a/ext/fiddle/extconf.rb +++ b/ext/fiddle/extconf.rb @@ -135,7 +135,6 @@ elsif have_header "windows.h" https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L135 end have_const('FFI_STDCALL', ffi_header) -have_func('ffi_closure_alloc', ffi_header) config = File.read(RbConfig.expand(File.join($arch_hdrdir, "ruby/config.h"))) types = {"SIZE_T"=>"SSIZE_T", "PTRDIFF_T"=>nil, "INTPTR_T"=>nil} @@ -154,6 +153,9 @@ end https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L153 if libffi $LOCAL_LIBS.prepend("./#{libffi.a} ").strip! # to exts.mk $INCFLAGS.gsub!(/-I#{libffi.dir}/, '-I$(LIBFFI_DIR)') + $defs << "-DUSE_FFI_CLOSURE_ALLOC=1" +else + have_func('ffi_closure_alloc', ffi_header) end $INCFLAGS << " -I$(top_srcdir)" create_makefile 'fiddle' do |conf| -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/