summaryrefslogtreecommitdiff
path: root/internal/gc.h
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-12-02 14:58:43 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-12-26 20:45:12 +0900
commit0958e19ffb047781fe1506760c7cbd8d7fe74e57 (patch)
treeca20d9181667d746c6df55c63f595980e9a77fbc /internal/gc.h
parent863dbb21d8912c73e84fed47f2d3a1ac5d8275d4 (diff)
add several __has_something macro
With these macros implemented we can write codes just like we can assume the compiler being clang. MSC_VERSION_SINCE is defined to implement those macros, but turned out to be handy for other places. The -fdeclspec compiler flag is necessary for clang to properly handle __has_declspec().
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2711
Diffstat (limited to 'internal/gc.h')
-rw-r--r--internal/gc.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/internal/gc.h b/internal/gc.h
index cf59eaed0b..6e3fb8996d 100644
--- a/internal/gc.h
+++ b/internal/gc.h
@@ -47,11 +47,9 @@ RUBY_SYMBOL_EXPORT_END
rb_wb_unprotected_newobj_of(klass, flags))
#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
-#ifdef __has_attribute
#if __has_attribute(alloc_align)
__attribute__((__alloc_align__(1)))
#endif
-#endif
void *rb_aligned_malloc(size_t, size_t) RUBY_ATTR_MALLOC RUBY_ATTR_ALLOC_SIZE((2));
size_t rb_size_mul_or_raise(size_t, size_t, VALUE); /* used in compile.c */