summaryrefslogtreecommitdiff
path: root/memory_view.c
diff options
context:
space:
mode:
author卜部昌平 <[email protected]>2020-10-06 12:05:20 +0900
committer卜部昌平 <[email protected]>2020-10-06 14:20:10 +0900
commitae94c5bf5d53b061659f9f08e1ee1b46d1447181 ()
treea79c3571b6c8b284f5fc9ffced7d9e876bd2a76a /memory_view.c
parent7d594399f666f35eff1c7be4ec944605dc9aa49c (diff)
STRUCT_ALIGNOF: use RUBY_ALIGNOF
This was a workaround for RUBY_ALIGNOF's glitch, which has already been fixed. See also https://.com/ruby/ruby/pull/3570
Notes: Merged: https://.com/ruby/ruby/pull/3631
-rw-r--r--memory_view.c3
1 files changed, 1 insertions, 2 deletions
@@ -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); \
} while(0)
static ID id_memory_view;