# HG changeset patch # User Christian Brabandt # Date 1533327304 -7200 # Node ID dda317774511cadedb2a00389f059f50c38139e6 # Parent 9a3f27045ff411d73006ac5c17f1ad11ff5be0a4 patch 8.1.0236: Ruby build fails when ruby_intern is missing commit https://github.com/vim/vim/commit/82593c1a3a2c5e39603ed76819f83b1197c06c8b Author: Bram Moolenaar Date: Fri Aug 3 22:03:17 2018 +0200 patch 8.1.0236: Ruby build fails when ruby_intern is missing Problem: Ruby build fails when ruby_intern is missing. Solution: Do not use ruby_intern2. (Ken Takata) diff --git a/src/if_ruby.c b/src/if_ruby.c --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -253,10 +253,11 @@ 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 -# ifdef RUBY19_OR_LATER +# ifndef rb_intern +# define rb_intern dll_rb_intern +# endif +# ifdef RUBY_CONST_ID_CACHE # define rb_intern2 dll_rb_intern2 -# else -# define rb_intern dll_rb_intern # endif # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 @@ -392,10 +393,9 @@ static VALUE (*dll_rb_hash_aset) (VALUE, static VALUE (*dll_rb_hash_new) (void); static VALUE (*dll_rb_inspect) (VALUE); static VALUE (*dll_rb_int2inum) (long); -# ifdef RUBY19_OR_LATER +static ID (*dll_rb_intern) (const char*); +# ifdef RUBY_CONST_ID_CACHE static ID (*dll_rb_intern2) (const char*, long); -# else -static ID (*dll_rb_intern) (const char*); # endif # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ static long (*dll_rb_fix2int) (VALUE); @@ -596,10 +596,9 @@ static struct {"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new}, {"rb_inspect", (RUBY_PROC*)&dll_rb_inspect}, {"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum}, -# ifdef RUBY19_OR_LATER + {"rb_intern", (RUBY_PROC*)&dll_rb_intern}, +# ifdef RUBY_CONST_ID_CACHE {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2}, -# else - {"rb_intern", (RUBY_PROC*)&dll_rb_intern}, # endif # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ {"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int}, diff --git a/src/version.c b/src/version.c --- 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 */ /**/ + 236, +/**/ 235, /**/ 234,