summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-04 17:24:44 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-04 17:24:44 +0200
commit218beb3e96bcb7b20395be3bec6076c767be71a1 (patch)
treee2c049d5e732812dd54d573acfdd3b546ec68a64 /src
parent7da1fb5532890d9c15cdb5b9bec158f9f9c105a7 (diff)
downloadvim-git-8.1.0239.tar.gz
patch 8.1.0239: now Ruby build fails on other systemsv8.1.0239
Problem: Now Ruby build fails on other systems. Solution: Always define rb_intern. (Ken Takata, closes #3275)
Diffstat (limited to 'src')
-rw-r--r--src/if_ruby.c18
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 12 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c
index 63f731250..450f34a0b 100644
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -253,12 +253,12 @@ static void ruby_vim_init(void);
# define rb_hash_new dll_rb_hash_new
# define rb_inspect dll_rb_inspect
# define rb_int2inum dll_rb_int2inum
-# ifndef rb_intern
-# define rb_intern dll_rb_intern
-# endif
-# ifdef RUBY_CONST_ID_CACHE
-# define rb_intern2 dll_rb_intern2
-# endif
+
+// ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
+// work. Not using the cache appears to be the best solution.
+# undef rb_intern
+# define rb_intern dll_rb_intern
+
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
# define rb_fix2int dll_rb_fix2int
@@ -394,9 +394,6 @@ static VALUE (*dll_rb_hash_new) (void);
static VALUE (*dll_rb_inspect) (VALUE);
static VALUE (*dll_rb_int2inum) (long);
static ID (*dll_rb_intern) (const char*);
-# ifdef RUBY_CONST_ID_CACHE
-static ID (*dll_rb_intern2) (const char*, long);
-# endif
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
static long (*dll_rb_fix2int) (VALUE);
static long (*dll_rb_num2int) (VALUE);
@@ -597,9 +594,6 @@ static struct
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
{"rb_intern", (RUBY_PROC*)&dll_rb_intern},
-# ifdef RUBY_CONST_ID_CACHE
- {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
-# endif
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},
diff --git a/src/version.c b/src/version.c
index c5f181256..bd8da20b4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 239,
+/**/
238,
/**/
237,