Skip to content

Commit f7cf484

Browse files
brammooldouglasdrumond
authored andcommitted
patch 7.4.705 Problem: Can't build with Ruby 2.2. Solution: Add #ifdefs to handle the incompatible change. (Andrei Olsen)
1 parent 73eacbf commit f7cf484

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/if_ruby.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ static void (*dll_rb_gc_writebarrier_unprotect)(VALUE obj);
404404
# endif
405405

406406
# if defined(RUBY19_OR_LATER) && !defined(PROTO)
407+
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
408+
long rb_num2long_stub(VALUE x)
409+
# else
407410
SIGNED_VALUE rb_num2long_stub(VALUE x)
411+
# endif
408412
{
409413
return dll_rb_num2long(x);
410414
}
@@ -429,7 +433,11 @@ rb_float_new_in_heap(double d)
429433
{
430434
return dll_rb_float_new(d);
431435
}
436+
# if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 22
437+
unsigned long rb_num2ulong(VALUE x)
438+
# else
432439
VALUE rb_num2ulong(VALUE x)
440+
# endif
433441
{
434442
return (long)RSHIFT((SIGNED_VALUE)(x),1);
435443
}

src/version.c

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

757757
static int included_patches[] =
758758
{ /* Add new patch number below this line */
759+
/**/
760+
705,
759761
/**/
760762
704,
761763
/**/

0 commit comments

Comments
 (0)