Skip to content

Commit 8f853b8

Browse files
committed
Test broken Vim master Ruby
1 parent 61a7911 commit 8f853b8

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

src/if_ruby.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@
7373
# define rb_num2int rb_num2int_stub
7474
# endif
7575

76-
# if RUBY_VERSION >= 20
77-
// USE_TYPEDDATA is not defined yet. We just check for 2.0.
78-
# define rb_check_typeddata rb_check_typeddata_stub
79-
#endif
80-
8176
# if RUBY_VERSION == 21
8277
// Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses
8378
// rb_gc_writebarrier_unprotect_promoted if USE_RGENGC
@@ -248,6 +243,12 @@ static int ruby_convert_to_vim_value(VALUE val, typval_T *rettv);
248243
# if RUBY_VERSION < 30
249244
# define rb_check_type dll_rb_check_type
250245
# endif
246+
# ifdef USE_TYPEDDATA
247+
# if RUBY_VERSION >= 40
248+
# define rbimpl_check_typeddata dll_rbimpl_check_typeddata
249+
# endif
250+
# define rb_check_typeddata dll_rb_check_typeddata
251+
# endif
251252
# define rb_class_path dll_rb_class_path
252253
# ifdef USE_TYPEDDATA
253254
# if RUBY_VERSION >= 23
@@ -375,6 +376,9 @@ VALUE *dll_rb_cTrueClass;
375376
static VALUE (*dll_rb_class_new_instance) (int,VALUE*,VALUE);
376377
static void (*dll_rb_check_type) (VALUE,int);
377378
# ifdef USE_TYPEDDATA
379+
# if RUBY_VERSION >= 40
380+
static void *(*dll_rbimpl_check_typeddata) (VALUE,const rb_data_type_t *);
381+
# endif
378382
static void *(*dll_rb_check_typeddata) (VALUE,const rb_data_type_t *);
379383
# endif
380384
static VALUE (*dll_rb_class_path) (VALUE);
@@ -603,12 +607,6 @@ rb_unexpected_type_stub(VALUE self, int t)
603607
dll_rb_unexpected_type(self, t);
604608
}
605609
# endif
606-
# ifdef USE_TYPEDDATA
607-
void *rb_check_typeddata_stub(VALUE obj, const rb_data_type_t *data_type)
608-
{
609-
return dll_rb_check_typeddata(obj, data_type);
610-
}
611-
# endif
612610
# endif // ifndef PROTO
613611

614612
static HINSTANCE hinstRuby = NULL; // Instance of ruby.dll

0 commit comments

Comments
 (0)