Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
Various attribute-related macros. More...
#include "ruby/internal/config.h"
#include "ruby/internal/attr/alloc_size.h"
#include "ruby/internal/attr/cold.h"
#include "ruby/internal/attr/const.h"
#include "ruby/internal/attr/deprecated.h"
#include "ruby/internal/attr/error.h"
#include "ruby/internal/attr/forceinline.h"
#include "ruby/internal/attr/format.h"
#include "ruby/internal/attr/maybe_unused.h"
#include "ruby/internal/attr/noinline.h"
#include "ruby/internal/attr/nonnull.h"
#include "ruby/internal/attr/noreturn.h"
#include "ruby/internal/attr/pure.h"
#include "ruby/internal/attr/restrict.h"
#include "ruby/internal/attr/returns_nonnull.h"
#include "ruby/internal/attr/warning.h"
#include "ruby/internal/has/attribute.h"
Go to the source code of this file.
Various attribute-related macros.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. Definition in file attributes.h.
#define ALWAYS_INLINE | ( | x | ) | RBIMPL_ATTR_FORCEINLINE() x |
Definition at line 86 of file attributes.h.
#define COLDFUNC RBIMPL_ATTR_COLD() |
Definition at line 106 of file attributes.h.
#define CONSTFUNC | ( | x | ) | RBIMPL_ATTR_CONST() x |
Definition at line 51 of file attributes.h.
#define DEPRECATED | ( | x | ) | RBIMPL_ATTR_DEPRECATED(("")) x |
Definition at line 57 of file attributes.h.
#define DEPRECATED_BY | ( | n, | |
x | |||
) | RBIMPL_ATTR_DEPRECATED(("by: " # n)) x |
Definition at line 60 of file attributes.h.
#define DEPRECATED_TYPE | ( | mesg, | |
decl | |||
) |
Definition at line 64 of file attributes.h.
#define ERRORFUNC | ( | mesg, | |
x | |||
) | RBIMPL_ATTR_ERROR(mesg) x |
Definition at line 90 of file attributes.h.
#define FUNC_MINIMIZED | ( | x | ) | x |
Definition at line 122 of file attributes.h.
#define FUNC_UNOPTIMIZED | ( | x | ) | x |
Definition at line 126 of file attributes.h.
#define HAVE_ATTRIBUTE_ERRORFUNC 1 |
Definition at line 92 of file attributes.h.
#define HAVE_ATTRIBUTE_WARNINGFUNC 1 |
Definition at line 98 of file attributes.h.
#define NOINLINE | ( | x | ) | RBIMPL_ATTR_NOINLINE() x |
Definition at line 82 of file attributes.h.
#define NORETURN | ( | x | ) | RBIMPL_ATTR_NORETURN() x |
Definition at line 148 of file attributes.h.
#define NORETURN_STYLE_NEW |
Definition at line 149 of file attributes.h.
#define PACKED_STRUCT | ( | x | ) | x |
Definition at line 152 of file attributes.h.
#define PACKED_STRUCT_UNALIGNED | ( | x | ) | x |
Definition at line 159 of file attributes.h.
#define PRINTF_ARGS | ( | decl, | |
string_index, | |||
first_to_check | |||
) |
Definition at line 108 of file attributes.h.
#define PUREFUNC | ( | x | ) | RBIMPL_ATTR_PURE() x |
Definition at line 54 of file attributes.h.
#define RB_UNUSED_VAR | ( | x | ) | x RBIMPL_ATTR_MAYBE_UNUSED() |
Definition at line 164 of file attributes.h.
#define RUBY_ALIAS_FUNCTION | ( | prot, | |
name, | |||
args | |||
) | RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args) |
Definition at line 140 of file attributes.h.
#define RUBY_ALIAS_FUNCTION_TYPE | ( | type, | |
prot, | |||
name, | |||
args | |||
) | FUNC_MINIMIZED(type prot) {return (type)name args;} |
Definition at line 130 of file attributes.h.
#define RUBY_ALIAS_FUNCTION_VOID | ( | prot, | |
name, | |||
args | |||
) | FUNC_MINIMIZED(void prot) {name args;} |
Definition at line 135 of file attributes.h.
#define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE |
Definition at line 113 of file attributes.h.
#define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT() |
Definition at line 116 of file attributes.h.
#define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL() |
Definition at line 119 of file attributes.h.
#define RUBY_CXX_DEPRECATED | ( | mseg | ) | RBIMPL_ATTR_DEPRECATED((mseg)) |
Definition at line 79 of file attributes.h.
#define RUBY_FUNC_NONNULL | ( | n, | |
x | |||
) | RBIMPL_ATTR_NONNULL(n) x |
Definition at line 145 of file attributes.h.
#define WARNINGFUNC | ( | mesg, | |
x | |||
) | RBIMPL_ATTR_WARNING(mesg) x |
Definition at line 96 of file attributes.h.