Skip to content

Commit

Permalink
[ruby/fiddle] Check HAVE_RUBY_MEMORY_VIEW_H rather than API version
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jul 13, 2021
1 parent a5d6ea9 commit 40d45ab
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ext/fiddle/fiddle.h
Expand Up @@ -2,7 +2,6 @@
#define FIDDLE_H

#include <ruby.h>
#include <ruby/version.h>
#include <errno.h>

#if defined(_WIN32)
Expand Down Expand Up @@ -190,7 +189,7 @@
#define ALIGN_INT32_T ALIGN_OF(int32_t)
#define ALIGN_INT64_T ALIGN_OF(int64_t)

#if RUBY_API_VERSION_MAJOR >= 3
#ifdef HAVE_RUBY_MEMORY_VIEW_H
# define FIDDLE_MEMORY_VIEW
#endif

Expand Down

0 comments on commit 40d45ab

Please sign in to comment.