Skip to content

Commit 218beb3

Browse files
committed
patch 8.1.0239: now Ruby build fails on other systems
Problem: Now Ruby build fails on other systems. Solution: Always define rb_intern. (Ken Takata, closes #3275)
1 parent 7da1fb5 commit 218beb3

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

src/if_ruby.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +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-
# ifndef rb_intern
257-
# define rb_intern dll_rb_intern
258-
# endif
259-
# ifdef RUBY_CONST_ID_CACHE
260-
# define rb_intern2 dll_rb_intern2
261-
# endif
256+
257+
// ruby.h may redefine rb_intern to use RUBY_CONST_ID_CACHE(), but that won't
258+
// work. Not using the cache appears to be the best solution.
259+
# undef rb_intern
260+
# define rb_intern dll_rb_intern
261+
262262
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
263263
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18
264264
# define rb_fix2int dll_rb_fix2int
@@ -394,9 +394,6 @@ static VALUE (*dll_rb_hash_new) (void);
394394
static VALUE (*dll_rb_inspect) (VALUE);
395395
static VALUE (*dll_rb_int2inum) (long);
396396
static ID (*dll_rb_intern) (const char*);
397-
# ifdef RUBY_CONST_ID_CACHE
398-
static ID (*dll_rb_intern2) (const char*, long);
399-
# endif
400397
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
401398
static long (*dll_rb_fix2int) (VALUE);
402399
static long (*dll_rb_num2int) (VALUE);
@@ -597,9 +594,6 @@ static struct
597594
{"rb_inspect", (RUBY_PROC*)&dll_rb_inspect},
598595
{"rb_int2inum", (RUBY_PROC*)&dll_rb_int2inum},
599596
{"rb_intern", (RUBY_PROC*)&dll_rb_intern},
600-
# ifdef RUBY_CONST_ID_CACHE
601-
{"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
602-
# endif
603597
# if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */
604598
{"rb_fix2int", (RUBY_PROC*)&dll_rb_fix2int},
605599
{"rb_num2int", (RUBY_PROC*)&dll_rb_num2int},

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+
239,
797799
/**/
798800
238,
799801
/**/

0 commit comments

Comments
 (0)