summaryrefslogtreecommitdiff
path: root/include/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-19 15:35:24 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-01-20 00:26:52 +0900
commit6f3aff3961a4c5ce87e05096a1a9dcf1055b7647 (patch)
treed5bf3de113fdc32d59f7807cc27464bd6b49eb0d /include/ruby
parent569fbf229b0b107859e006c810a9d04851e96655 (diff)
[Bug #19289] Retain `ruby_abi_version` function
A few extension libraries, to hide all symbols except for necessary to load, hardcode the symbols to be exported in symbol list files for linker without even checking by `have_func`. As a workaround for such libraries, retain `ruby_abi_version` symbol always even in released versions for now.
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/internal/abi.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h
index b5ce9dc289..8e1bbf3951 100644
--- a/include/ruby/internal/abi.h
+++ b/include/ruby/internal/abi.h
@@ -31,6 +31,7 @@
#if defined(HAVE_FUNC_WEAK) && !defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
# define RUBY_DLN_CHECK_ABI
#endif
+#endif /* RUBY_ABI_VERSION */
#ifdef RUBY_DLN_CHECK_ABI
@@ -41,7 +42,11 @@ extern "C" {
RUBY_FUNC_EXPORTED unsigned long long __attribute__((weak))
ruby_abi_version(void)
{
+# ifdef RUBY_ABI_VERSION
return RUBY_ABI_VERSION;
+# else
+ return 0;
+# endif
}
# ifdef __cplusplus
@@ -51,5 +56,3 @@ ruby_abi_version(void)
#endif
#endif
-
-#endif