Skip to content

Commit 82593c1

Browse files
committed
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)
1 parent 3bf5e6a commit 82593c1

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/if_ruby.c

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,12 @@ static void ruby_vim_init(void);
253253
# define rb_hash_new dll_rb_hash_new
254254
# define rb_inspect dll_rb_inspect
255255
# define rb_int2inum dll_rb_int2inum
256-
# ifdef RUBY19_OR_LATER
257-
# define rb_intern2 dll_rb_intern2
258-
# else
256+
# ifndef rb_intern
259257
# define rb_intern dll_rb_intern
260258
# endif
259+
# ifdef RUBY_CONST_ID_CACHE
260+
# define rb_intern2 dll_rb_intern2
261+
# endif
261262
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
262263
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
263264
# define rb_fix2int dll_rb_fix2int
@@ -392,10 +393,9 @@ static VALUE (*dll_rb_hash_aset) (VALUE, VALUE, VALUE);
392393
static VALUE (*dll_rb_hash_new) (void);
393394
static VALUE (*dll_rb_inspect) (VALUE);
394395
static VALUE (*dll_rb_int2inum) (long);
395-
# ifdef RUBY19_OR_LATER
396-
static ID (*dll_rb_intern2) (const char*, long);
397-
# else
398396
static ID (*dll_rb_intern) (const char*);
397+
# ifdef RUBY_CONST_ID_CACHE
398+
static ID (*dll_rb_intern2) (const char*, long);
399399
# endif
400400
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
401401
static long (*dll_rb_fix2int) (VALUE);
@@ -596,10 +596,9 @@ static struct
596596
{"rb_hash_new", (RUBY_PROC*)&dll_rb_hash_new},
597597
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
598598
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
599-
# ifdef RUBY19_OR_LATER
600-
{"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
601-
# else
602599
{"rb_intern", (RUBY_PROC*)&dll_rb_intern},
600+
# ifdef RUBY_CONST_ID_CACHE
601+
{"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
603602
# endif
604603
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
605604
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ static char *(features[]) =
794794

795795
static int included_patches[] =
796796
{ /* Add new patch number below this line */
797+
/**/
798+
236,
797799
/**/
798800
235,
799801
/**/

0 commit comments

Comments
 (0)