summaryrefslogtreecommitdiff
path: root/include/ruby/internal/abi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ruby/internal/abi.h')
-rw-r--r--include/ruby/internal/abi.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h
index fe1977a9a1..7ceb8c40b7 100644
--- a/include/ruby/internal/abi.h
+++ b/include/ruby/internal/abi.h
@@ -24,15 +24,16 @@
* In released versions of Ruby, this number is not defined since teeny
* versions of Ruby should guarantee ABI compatibility.
*/
-#define RUBY_ABI_VERSION 2
+#define RUBY_ABI_VERSION 3
/* Windows does not support weak symbols so ruby_abi_version will not exist
* in the shared library. */
#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
+#if defined(RUBY_DLN_CHECK_ABI) && !defined(RUBY_EXPORT)
# ifdef __cplusplus
extern "C" {
@@ -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