]> granicus.if.org Git - vim/commitdiff
patch 7.4.987 v7.4.987
authorBram Moolenaar <Bram@vim.org>
Mon, 28 Dec 2015 21:05:28 +0000 (22:05 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 28 Dec 2015 21:05:28 +0000 (22:05 +0100)
Problem:    Can't build with Ruby 1.9.2.
Solution:   Require Rub 2.0 for defining USE_TYPEDDATA.

src/if_ruby.c
src/version.c

index 51a9f03024766eee5b8d96fc98c368cf563c6f60..fa03359f01f8d85d4427e2a4ed95dd4e861b4324 100644 (file)
 # 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 */
 #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
 
index 8412461771df7182647565d9dbd2cadfcacd2ad4..c304f69e696917ef35fba936e57231474a354659 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    987,
 /**/
     986,
 /**/