summaryrefslogtreecommitdiff
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-15 02:59:18 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-15 02:59:18 +0000
commitcabc3b65162ea3c4dc2a5c2437ed2b2a1e5b7b15 (patch)
tree99fbefd93f2cf288d9e399c62b10963728b59ff4 /include/ruby/ruby.h
parent65236c069e6bc3870aae210f3b24f29f0992ac11 (diff)
__declspec(align(#)) does not take sizeof()
Use compile-time constant expression instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 19489bb18c..1e1edc26bd 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -853,7 +853,7 @@ enum ruby_fl_type {
RUBY_FL_SINGLETON = RUBY_FL_USER0
};
-struct RUBY_ALIGNAS(sizeof(VALUE)) RBasic {
+struct RUBY_ALIGNAS(SIZEOF_VALUE) RBasic {
VALUE flags;
const VALUE klass;
};
@@ -950,7 +950,7 @@ enum ruby_rstring_flags {
RSTRING_ENUM_END
};
-typedef RUBY_ALIGNAS(sizeof(VALUE)) char ruby_aligned_char;
+typedef RUBY_ALIGNAS(SIZEOF_VALUE) char ruby_aligned_char;
struct RString {
struct RBasic basic;
@@ -963,7 +963,7 @@ struct RString {
VALUE shared;
} aux;
} heap;
- char RUBY_ALIGNAS(sizeof(VALUE)) ary[RSTRING_EMBED_LEN_MAX + 1];
+ char RUBY_ALIGNAS(SIZEOF_VALUE) ary[RSTRING_EMBED_LEN_MAX + 1];
} as;
};
#define RSTRING_EMBED_LEN(str) \