Ruby: include/ruby/internal/has/c_attribute.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

c_attribute.h
Go to the documentation of this file.
1#ifndef RBIMPL_HAS_C_ATTRIBUTE_H /*-*-C++-*-vi:se ft=cpp:*/
2#define RBIMPL_HAS_C_ATTRIBUTE_H
25#if defined(__cplusplus)
26# /* Makes no sense. */
27# define RBIMPL_HAS_C_ATTRIBUTE(_) 0
28
29#elif defined(__has_c_attribute)
30# define RBIMPL_HAS_C_ATTRIBUTE(_) __has_c_attribute(_)
31
32#else
33# /* As of writing everything that lacks __has_c_attribute also completely
34# * lacks C2x attributes as well. Might change in future? */
35# define RBIMPL_HAS_C_ATTRIBUTE(_) 0
36#endif
37
38#endif /* RBIMPL_HAS_C_ATTRIBUTE_H */