ruby-changes:71308
From: Peter <ko1@a...>
Date: Wed, 2 Mar 2022 03:41:17 +0900 (JST)
Subject: [ruby-changes:71308] 1289721892 (master): Wrap ruby_abi_version in `extern "C"` for C++
https://git.ruby-lang.org/ruby.git/commit/?id=1289721892 From 128972189284f4338722e8a910d0b4f6e7a02b31 Mon Sep 17 00:00:00 2001 From: Peter Zhu <peter@p...> Date: Tue, 1 Mar 2022 13:38:48 -0500 Subject: Wrap ruby_abi_version in `extern "C"` for C++ Make ruby_abi_version have C linkage so that the symbol can be found in the shared object. --- include/ruby/internal/abi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h index 81899dcd31..7a6caa6e2e 100644 --- a/include/ruby/internal/abi.h +++ b/include/ruby/internal/abi.h @@ -32,12 +32,20 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/abi.h#L32 #ifdef RUBY_DLN_CHECK_ABI +# ifdef __cplusplus +extern "C" { +# endif + RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak)) ruby_abi_version(void) { return RUBY_ABI_VERSION; } +# ifdef __cplusplus +} +# endif + #endif #endif -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/