# define rb_num2int rb_num2int_stub
# endif
+# if RUBY_VERSION >= 20
+// USE_TYPEDDATA is not defined yet. We just check for 2.0.
+# define rb_check_typeddata rb_check_typeddata_stub
+#endif
+
# if RUBY_VERSION == 21
// Ruby 2.1 adds new GC called RGenGC and RARRAY_PTR uses
// rb_gc_writebarrier_unprotect_promoted if USE_RGENGC
# if RUBY_VERSION < 30
# define rb_check_type dll_rb_check_type
# endif
-# ifdef USE_TYPEDDATA
-# if RUBY_VERSION >= 40
-# define rbimpl_check_typeddata dll_rbimpl_check_typeddata
-# endif
-# define rb_check_typeddata dll_rb_check_typeddata
-# endif
# define rb_class_path dll_rb_class_path
# ifdef USE_TYPEDDATA
# if RUBY_VERSION >= 23
static VALUE (*dll_rb_class_new_instance) (int,VALUE*,VALUE);
static void (*dll_rb_check_type) (VALUE,int);
# ifdef USE_TYPEDDATA
-# if RUBY_VERSION >= 40
-static void *(*dll_rbimpl_check_typeddata) (VALUE,const rb_data_type_t *);
-# endif
static void *(*dll_rb_check_typeddata) (VALUE,const rb_data_type_t *);
# endif
static VALUE (*dll_rb_class_path) (VALUE);
dll_rb_unexpected_type(self, t);
}
# endif
+# ifdef USE_TYPEDDATA
+void *rb_check_typeddata_stub(VALUE obj, const rb_data_type_t *data_type)
+{
+ return dll_rb_check_typeddata(obj, data_type);
+}
+# endif
# endif // ifndef PROTO
static HINSTANCE hinstRuby = NULL; // Instance of ruby.dll