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.
This commit is contained in:
Peter Zhu 2022-03-01 13:38:48 -05:00
parent 4bdb4a1873
commit 1289721892

View File

@ -32,12 +32,20 @@
#ifdef RUBY_DLN_CHECK_ABI #ifdef RUBY_DLN_CHECK_ABI
# ifdef __cplusplus
extern "C" {
# endif
RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak)) RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak))
ruby_abi_version(void) ruby_abi_version(void)
{ {
return RUBY_ABI_VERSION; return RUBY_ABI_VERSION;
} }
# ifdef __cplusplus
}
# endif
#endif #endif
#endif #endif