ruby-changes:63427
From: Benoit <ko1@a...>
Date: Sun, 25 Oct 2020 19:43:45 +0900 (JST)
Subject: [ruby-changes:63427] 99e067eac6 (master): Try to fix compilation on MSVC
https://git.ruby-lang.org/ruby.git/commit/?id=99e067eac6 From 99e067eac6fd2babcdd56142493ef0396744af85 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Sun, 25 Oct 2020 11:42:20 +0100 Subject: Try to fix compilation on MSVC diff --git a/spec/ruby/optional/capi/ext/thread_spec.c b/spec/ruby/optional/capi/ext/thread_spec.c index 53eae45..845c022 100644 --- a/spec/ruby/optional/capi/ext/thread_spec.c +++ b/spec/ruby/optional/capi/ext/thread_spec.c @@ -73,13 +73,19 @@ static void* blocking_gvl_func_for_udf_io(void *data) { https://github.com/ruby/ruby/blob/trunk/spec/ruby/optional/capi/ext/thread_spec.c#L73 } } +#if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wcast-function-type" +#endif + static VALUE thread_spec_rb_thread_call_without_gvl_native_function(VALUE self) { pid_t ret = (pid_t) (long) rb_thread_call_without_gvl((void *(*)(void *)) getpid, 0, RUBY_UBF_IO, 0); return LONG2FIX(ret); } + +#if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop +#endif /* Returns true if the thread is interrupted. */ static VALUE thread_spec_rb_thread_call_without_gvl_with_ubf_io(VALUE self) { -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/