From 93aba6a7e4ed4a81269b6f673b14f4a3ba03979c Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 18 Apr 2023 16:22:21 -0400 Subject: Remove old definitions in compat.h for Ruby 1.x These definitions all exist in all recent versions of Ruby, so it's dead code that we can remove. --- ext/ffi_c/compat.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/ext/ffi_c/compat.h b/ext/ffi_c/compat.h index 889a4be..856836f 100644 --- a/ext/ffi_c/compat.h +++ b/ext/ffi_c/compat.h @@ -32,26 +32,6 @@ #include -#ifndef RARRAY_LEN -# define RARRAY_LEN(ary) RARRAY(ary)->len -#endif - -#ifndef RARRAY_PTR -# define RARRAY_PTR(ary) RARRAY(ary)->ptr -#endif - -#ifndef RSTRING_LEN -# define RSTRING_LEN(s) RSTRING(s)->len -#endif - -#ifndef RSTRING_PTR -# define RSTRING_PTR(s) RSTRING(s)->ptr -#endif - -#ifndef NUM2ULL -# define NUM2ULL(x) rb_num2ull((VALUE)x) -#endif - #ifndef roundup # define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) #endif @@ -75,9 +55,6 @@ # define MIN(a, b) ((a) < (b) ? (a) : (b)) #endif -#ifndef RB_GC_GUARD -# define RB_GC_GUARD(x) (x) -#endif #ifdef HAVE_RB_GC_MARK_MOVABLE #define ffi_compact_callback(x) .dcompact = (x), -- cgit v1.2.1