diff options
author | Peter Zhu <peter@peterzhu.ca> | 2022-03-01 13:38:48 -0500 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2022-03-01 13:38:48 -0500 |
commit | 128972189284f4338722e8a910d0b4f6e7a02b31 (patch) | |
tree | 15eb1e55b02e1c03ffe693eccaaaab01d2720088 /include/ruby | |
parent | 4bdb4a1873bea9768bcf1bff8d7bffd80fdabb44 (diff) |
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.
Diffstat (limited to 'include/ruby')
-rw-r--r-- | include/ruby/internal/abi.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ #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 |