summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2023-04-18 16:22:21 -0400
committerPeter Zhu <peter@peterzhu.ca>2023-04-18 16:23:24 -0400
commit93aba6a7e4ed4a81269b6f673b14f4a3ba03979c (patch)
tree3484e19ea57d195dec42190caa8e52cb88f47d21
parent250c31a25d81339cfe928a433ada3c0f17eae580 (diff)
downloadffi-93aba6a7e4ed4a81269b6f673b14f4a3ba03979c.tar.gz
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.
-rw-r--r--ext/ffi_c/compat.h23
1 files changed, 0 insertions, 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 <ruby.h>
-#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),