summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-12-28 22:05:28 +0100
committerBram Moolenaar <Bram@vim.org>2015-12-28 22:05:28 +0100
commit0d27f64f7188efef99062a3c5694027c12401670 (patch)
tree1b97603f30d95d67b74153296cb465ca36bfba78 /src
parentda9888a3f0118ce1ce5acbdcf4720602c2de2a3b (diff)
patch 7.4.987v7.4.987
Problem: Can't build with Ruby 1.9.2. Solution: Require Rub 2.0 for defining USE_TYPEDDATA.
Diffstat (limited to 'src')
-rw-r--r--src/if_ruby.c12
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 3 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 51a9f03024..fa03359f01 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -81,6 +81,11 @@
# define RUBY19_OR_LATER 1
#endif
+#if (defined(RUBY_VERSION) && RUBY_VERSION >= 20) \
+ || (defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 20)
+# define RUBY20_OR_LATER 1
+#endif
+
#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
/* Ruby 1.9 defines a number of static functions which use rb_num2long and
* rb_int2big */
@@ -122,11 +127,12 @@
#endif
/*
- * The TypedData_XXX macro family can be used since Ruby 1.9.2, and
- * the old Data_XXX macro family was deprecated on Ruby 2.2.
+ * The TypedData_XXX macro family can be used since Ruby 1.9.2 but
+ * rb_data_type_t changed in 1.9.3, therefore require at least 2.0.
+ * The old Data_XXX macro family was deprecated on Ruby 2.2.
* Use TypedData_XXX if available.
*/
-#ifdef TypedData_Wrap_Struct
+#if defined(TypedData_Wrap_Struct) && defined(RUBY20_OR_LATER)
# define USE_TYPEDDATA 1
#endif
diff --git a/src/version.c b/src/version.c
index 8412461771..c304f69e69 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 987,
+/**/
986,
/**/
985,