diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-10-06 12:05:20 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-10-06 14:20:10 +0900 |
commit | ae94c5bf5d53b061659f9f08e1ee1b46d1447181 (patch) | |
tree | a79c3571b6c8b284f5fc9ffced7d9e876bd2a76a /memory_view.c | |
parent | 7d594399f666f35eff1c7be4ec944605dc9aa49c (diff) |
STRUCT_ALIGNOF: use RUBY_ALIGNOF
This was a workaround for RUBY_ALIGNOF's glitch, which has already been
fixed. See also https://github.com/ruby/ruby/pull/3570
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3631
Diffstat (limited to 'memory_view.c')
-rw-r--r-- | memory_view.c | 3 |
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; |