summaryrefslogtreecommitdiff
path: root/ext/fiddle/pointer.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-14 15:38:55 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-14 18:55:59 +0900
commit169529a0c0973fa925ad3b36f4427d31e802a37e (patch)
tree12d70a5d6bf41b5dc781e4148d2ce9a7b6f75f4b /ext/fiddle/pointer.c
parent818c74b7f4d5b88833af26226fc81e563b5d11b9 (diff)
[ruby/fiddle] Check HAVE_RUBY_MEMORY_VIEW_H rather than API version (https://github.com/ruby/fiddle/pull/86)
https://github.com/ruby/fiddle/commit/c5abcc3a7e
Diffstat (limited to 'ext/fiddle/pointer.c')
-rw-r--r--ext/fiddle/pointer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/fiddle/pointer.c b/ext/fiddle/pointer.c
index 9d05c13..15107e3 100644
--- a/ext/fiddle/pointer.c
+++ b/ext/fiddle/pointer.c
@@ -9,7 +9,7 @@
#include <ctype.h>
#include <fiddle.h>
-#ifdef FIDDLE_MEMORY_VIEW
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
# include <ruby/memory_view.h>
#endif
@@ -92,7 +92,7 @@ static const rb_data_type_t fiddle_ptr_data_type = {
{fiddle_ptr_mark, fiddle_ptr_free, fiddle_ptr_memsize,},
};
-#ifdef FIDDLE_MEMORY_VIEW
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
static struct ptr_data *
fiddle_ptr_check_memory_view(VALUE obj)
{
@@ -841,7 +841,7 @@ Init_fiddle_pointer(void)
rb_define_method(rb_cPointer, "size", rb_fiddle_ptr_size_get, 0);
rb_define_method(rb_cPointer, "size=", rb_fiddle_ptr_size_set, 1);
-#ifdef FIDDLE_MEMORY_VIEW
+#ifdef HAVE_RUBY_MEMORY_VIEW_H
rb_memory_view_register(rb_cPointer, &fiddle_ptr_memory_view_entry);
#endif