diff options
author | 卜部昌平 <[email protected]> | 2021-01-18 19:57:48 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2021-09-10 20:00:06 +0900 |
commit | 818fabfcd96898192ab9de3cb31fc424bcd167c6 (patch) | |
tree | 5994db61fd95ab71f0e7b76cbb69dba9eb1e7baa /include/ruby/internal/stdalign.h | |
parent | 73d2bf97c1b93bb45d9c0edda02dde43165fc0da (diff) |
include/ruby/internal/stdalign.h: add doxygen
Unlike other "add doxygen" commits this one adds a preprocessor branch
that doxygen would process. This prevents it from parsing other parts
of the file.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4815
Diffstat (limited to 'include/ruby/internal/stdalign.h')
-rw-r--r-- | include/ruby/internal/stdalign.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/ruby/internal/stdalign.h b/include/ruby/internal/stdalign.h index dbc27849d5..ec68f6a882 100644 --- a/include/ruby/internal/stdalign.h +++ b/include/ruby/internal/stdalign.h @@ -83,7 +83,9 @@ * @see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560 * @see https://bugs.llvm.org/show_bug.cgi?id=26547 */ -#if defined(__cplusplus) +#if defined(__DOXYGEN__) +# define RBIMPL_ALIGNOF alignof +#elif defined(__cplusplus) # /* C++11 `alignof()` can be buggy. */ # /* see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69560 */ # /* But don't worry, we can use templates. */ @@ -117,7 +119,7 @@ struct rbimpl_alignof { # * There are 2 known pitfalls for this fallback implementation: # * # * First, it is either an undefined behaviour (C) or an explicit error (C++) -# * to define a struct inside of `offsetof`. C compilers tend to accept such +# * to define a struct inside of `offsetof`. C compilers tend to accept such # * things, but AFAIK C++ has no room to allow. # * # * Second, there exist T such that `struct { char _; T t; }` is invalid. A |