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.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/ruby/internal/abi.h b/include/ruby/internal/abi.h
index ed779f3558..e735a67564 100644
--- a/include/ruby/internal/abi.h
+++ b/include/ruby/internal/abi.h
@@ -1,6 +1,8 @@
#ifndef RUBY_ABI_H
#define RUBY_ABI_H
+#ifdef RUBY_ABI_VERSION /* should match the definition in config.h */
+
/* This number represents Ruby's ABI version.
*
* In development Ruby, it should be bumped every time an ABI incompatible
@@ -19,18 +21,19 @@
* - Backwards compatible refactors.
* - Editing comments.
*
- * In released versions of Ruby, this number should not be changed since teeny
+ * In released versions of Ruby, this number is not defined since teeny
* versions of Ruby should guarantee ABI compatibility.
*/
-#define RUBY_ABI_VERSION 1
+#define RUBY_ABI_VERSION 0
/* 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" {
@@ -39,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