[前][次][番号順一覧][スレッド一覧]

ruby-changes:59932

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Thu, 6 Feb 2020 11:47:16 +0900 (JST)
Subject: [ruby-changes:59932] 3b69552a5c (master): add predefined macros for Doxygen

https://git.ruby-lang.org/ruby.git/commit/?id=3b69552a5c

From 3b69552a5ca1fb814fd7279edd970be458a907f2 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: Sat, 21 Dec 2019 17:14:20 +0900
Subject: add predefined macros for Doxygen

Predefined macros are practices not very well recommended, but can be
better than having no documents at all.  Without those predefined
macros, Doxygen confused for instace PUREFUNC(int foo()) to be a
declaration of PUREFUNC, not foo.

diff --git a/template/Doxyfile.tmpl b/template/Doxyfile.tmpl
index a16e43b..59c184b 100644
--- a/template/Doxyfile.tmpl
+++ b/template/Doxyfile.tmpl
@@ -214,12 +214,52 @@ PERLMOD_MAKEVAR_PREFIX = https://github.com/ruby/ruby/blob/trunk/template/Doxyfile.tmpl#L214
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
+MACRO_EXPANSION        = YES
+EXPAND_ONLY_PREDEF     = YES
 SEARCH_INCLUDES        = YES
 INCLUDE_PATH           = <%=srcdir%> <%=srcdir%>/include
 INCLUDE_FILE_PATTERNS  =
-PREDEFINED             =
+PREDEFINED             = \
+    ALWAYS_INLINE(_)=_ \
+    COLDFUNC= \
+    CONSTFUNC(_)=_ \
+    DEPRECATED(_)=_ \
+    DEPRECATED_BY(__,_)=_ \
+    DEPRECATED_TYPE(__,_)=_ \
+    ERRORFUNC(__,_)=_ \
+    MJIT_FUNC_EXPORTED= \
+    MJIT_STATIC=extern \
+    MJIT_SYMBOL_EXPORT_BEGIN= \
+    MJIT_SYMBOL_EXPORT_END= \
+    NOINLINE(_)=_ \
+    NORETURN(_)=_ \
+    PRINTF_ARGS(_,__,___)=_ \
+    PUREFUNC(_)=_ \
+    RUBY_EXTERN=extern \
+    RUBY_FUNC_EXPORTED= \
+    RUBY_FUNC_NONNULL(__,_)=_ \
+    RUBY_SYMBOL_EXPORT_BEGIN= \
+    RUBY_SYMBOL_EXPORT_END= \
+    WARNINGFUNC(__,_)=_ \
+    _MSC_VER=1924 \
+    __DOXYGEN__ \
+    __GNUC_MINOR__=0 \
+    __GNUC_PATCHLEVEL__=0 \
+    __GNUC__=10 \
+    __STDC_VERSION__=201710L \
+    __clang__=10 \
+    __clang_major__=10 \
+    __clang_minor__=0 \
+    __clang_patchlevel__=0 \
+    __cplusplus=201704L \
+    __has_attribute(_)=0 \
+    __has_builtin(_)=0 \
+    __has_c_attribute(_)=0 \
+    __has_cpp_attribute(_)=0 \
+    __has_declspec_attribute(_)=0 \
+    __has_extension(_)=0 \
+    __has_feature(_)=0 \
+    __has_warning(_)=0
 EXPAND_AS_DEFINED      =
 SKIP_FUNCTION_MACROS   = YES
 #---------------------------------------------------------------------------
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]