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

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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 */