aboutsummaryrefslogtreecommitdiffstats
path: root/memory_view.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory_view.c')
-rw-r--r--memory_view.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/memory_view.c b/memory_view.c
index 0b3565caa3..4f3d8e3c55 100644
--- a/memory_view.c
+++ b/memory_view.c
@@ -12,8 +12,7 @@
#include "ruby/memory_view.h"
#define STRUCT_ALIGNOF(T, result) do { \
- struct S { char _; T t; }; \
- (result) = (int)offsetof(struct S, t); \
+ (result) = RUBY_ALIGNOF(T); \
} while(0)
static ID id_memory_view;