ruby-changes:67716
From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 10 Sep 2021 20:00:50 +0900 (JST)
Subject: [ruby-changes:67716] 818fabfcd9 (master): include/ruby/internal/stdalign.h: add doxygen
https://git.ruby-lang.org/ruby.git/commit/?id=818fabfcd9 From 818fabfcd96898192ab9de3cb31fc424bcd167c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= <shyouhei@r...> Date: Mon, 18 Jan 2021 19:57:48 +0900 Subject: 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. --- include/ruby/internal/stdalign.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/ruby/internal/stdalign.h b/include/ruby/internal/stdalign.h index dbc2784..ec68f6a 100644 --- a/include/ruby/internal/stdalign.h +++ b/include/ruby/internal/stdalign.h @@ -83,7 +83,9 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/stdalign.h#L83 * @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 { https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/stdalign.h#L119 # * 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/