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

ruby-changes:59889

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 31 Jan 2020 13:14:05 +0900 (JST)
Subject: [ruby-changes:59889] f31dc8a458 (master): a bit terse Doxygen comments [ci skip]

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

From f31dc8a45877f6db810fa5177270789baefeee0e 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: Fri, 31 Jan 2020 13:10:55 +0900
Subject: a bit terse Doxygen comments [ci skip]

Creative use of `@copydoc` Doxygen command and abusing its half-broken C
parser let us delete some lines of documentations, while preserving
document coverages.

diff --git a/include/ruby/backward/cxxanyargs.hpp b/include/ruby/backward/cxxanyargs.hpp
index 132956e..7eaaa63 100644
--- a/include/ruby/backward/cxxanyargs.hpp
+++ b/include/ruby/backward/cxxanyargs.hpp
@@ -22,36 +22,27 @@ extern "C++" { https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L22
 ///         problem because namespaces are allowed to reopen.
 namespace ruby {
 
-/// @brief  Backwards compatibility layer.
+/// Backwards compatibility layer.
 namespace backward {
 
-/// @brief  Provides ANYARGS deprecation warnings.
-///
-/// In C,  ANYARGS means there  is no function prototype.   Literally anything,
-/// even including  nothing, can be  a valid  ANYARGS.  So passing  a correctly
-/// prototyped function pointer  to an ANYARGS-ed function  parameter is valid,
-/// at the same time passing an ANYARGS-ed function pointer to a granular typed
-/// function  parameter is  also  valid.  However  on the  other  hand in  C++,
-/// ANYARGS doesn't actually mean any number of arguments.  C++'s ANYARGS means
-/// _variadic_ number of arguments.  This is incompatible with ordinal, correct
-/// function prototypes.
+/// Provides  ANYARGS deprecation  warnings. In  C, ANYARGS  means there  is no
+/// function prototype.  Literally  anything, even including nothing,  can be a
+/// valid ANYARGS.   So passing a  correctly prototyped function pointer  to an
+/// ANYARGS-ed  function  parameter is  valid,  at  the  same time  passing  an
+/// ANYARGS-ed function pointer to a  granular typed function parameter is also
+/// valid.  However on the other hand in C++, ANYARGS doesn't actually mean any
+/// number of arguments.   C++'s ANYARGS means _variadic_  number of arguments.
+/// This is incompatible with ordinal, correct function prototypes.
 ///
 /// Luckily, function  prototypes being distinct  each other means they  can be
 /// overloaded.  We can provide a compatibility layer for older Ruby APIs which
 /// used to have ANYARGS.  This namespace includes such attempts.
 namespace cxxanyargs {
 
-/// @brief ANYARGS-ed function type.
-typedef VALUE type(ANYARGS);
-
-/// @brief ANYARGS-ed function type, void variant.
-typedef void void_type(ANYARGS);
-
-/// @brief ANYARGS-ed function type, int variant.
-typedef int int_type(ANYARGS);
-
-/// @brief single-argumented function type.
-typedef VALUE onearg_type(VALUE);
+typedef VALUE type(ANYARGS);      ///< ANYARGS-ed function type.
+typedef void void_type(ANYARGS);  ///< ANYARGS-ed function type, void variant.
+typedef int int_type(ANYARGS);    ///< ANYARGS-ed function type, int variant.
+typedef VALUE onearg_type(VALUE); ///< Single-argumented function type.
 
 /// @name Hooking global variables
 /// @{
@@ -73,13 +64,6 @@ rb_define_virtual_variable(const char *q, type *w, void_type *e) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L64
 }
 
 RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Getter function.
-/// @param[in]   e  Setter function.
-/// @note        Both functions can be nullptr.
-/// @see         rb_define_hooked_variable()
-/// @deprecated  Use glanular typed overload instead.
 inline void
 rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, void_type *e)
 {
@@ -88,13 +72,6 @@ rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, void_type *e) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L72
 }
 
 RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Getter function.
-/// @param[in]   e  Setter function.
-/// @note        Both functions can be nullptr.
-/// @see         rb_define_hooked_variable()
-/// @deprecated  Use glanular typed overload instead.
 inline void
 rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e)
 {
@@ -103,11 +80,6 @@ rb_define_virtual_variable(const char *q, type *w, rb_gvar_setter_t *e) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L80
 }
 
 #ifdef HAVE_NULLPTR
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Getter function.
-/// @param[in]   e  Setter function.
-/// @see         rb_define_hooked_variable()
 inline void
 rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, std::nullptr_t e)
 {
@@ -115,12 +87,6 @@ rb_define_virtual_variable(const char *q, rb_gvar_getter_t *w, std::nullptr_t e) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L87
 }
 
 RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Getter function.
-/// @param[in]   e  Setter function.
-/// @see         rb_define_hooked_variable()
-/// @deprecated  Use glanular typed overload instead.
 inline void
 rb_define_virtual_variable(const char *q, type *w, std::nullptr_t e)
 {
@@ -128,11 +94,6 @@ rb_define_virtual_variable(const char *q, type *w, std::nullptr_t e) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L94
     ::rb_define_virtual_variable(q, r, e);
 }
 
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Getter function.
-/// @param[in]   e  Setter function.
-/// @see         rb_define_hooked_variable()
 inline void
 rb_define_virtual_variable(const char *q, std::nullptr_t w, rb_gvar_setter_t *e)
 {
@@ -140,12 +101,6 @@ rb_define_virtual_variable(const char *q, std::nullptr_t w, rb_gvar_setter_t *e) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L101
 }
 
 RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Getter function.
-/// @param[in]   e  Setter function.
-/// @see         rb_define_hooked_variable()
-/// @deprecated  Use glanular typed overload instead.
 inline void
 rb_define_virtual_variable(const char *q, std::nullptr_t w, void_type *e)
 {
@@ -172,14 +127,6 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, void_type *r) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L127
 }
 
 RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Variable storage.
-/// @param[in]   e  Getter function.
-/// @param[in]   r  Setter function.
-/// @note        Both functions can be nullptr.
-/// @see         rb_define_virtual_variable()
-/// @deprecated  Use glanular typed overload instead.
 inline void
 rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, void_type *r)
 {
@@ -188,14 +135,6 @@ rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, void_typ https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L135
 }
 
 RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Variable storage.
-/// @param[in]   e  Getter function.
-/// @param[in]   r  Setter function.
-/// @note        Both functions can be nullptr.
-/// @see         rb_define_virtual_variable()
-/// @deprecated  Use glanular typed overload instead.
 inline void
 rb_define_hooked_variable(const char *q, VALUE *w, type *e, rb_gvar_setter_t *r)
 {
@@ -204,12 +143,6 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, rb_gvar_setter_t *r) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L143
 }
 
 #ifdef HAVE_NULLPTR
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Variable storage.
-/// @param[in]   e  Getter function.
-/// @param[in]   r  Setter function.
-/// @see         rb_define_virtual_variable()
 inline void
 rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, std::nullptr_t r)
 {
@@ -217,13 +150,6 @@ rb_define_hooked_variable(const char *q, VALUE *w, rb_gvar_getter_t *e, std::nul https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L150
 }
 
 RUBY_CXX_DEPRECATED("Use of ANYARGS in this function is deprecated")
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Variable storage.
-/// @param[in]   e  Getter function.
-/// @param[in]   r  Setter function.
-/// @see         rb_define_virtual_variable()
-/// @deprecated  Use glanular typed overload instead.
 inline void
 rb_define_hooked_variable(const char *q, VALUE *w, type *e, std::nullptr_t r)
 {
@@ -231,12 +157,6 @@ rb_define_hooked_variable(const char *q, VALUE *w, type *e, std::nullptr_t r) https://github.com/ruby/ruby/blob/trunk/include/ruby/backward/cxxanyargs.hpp#L157
     ::rb_define_hooked_variable(q, w, y, r);
 }
 
-/// @brief       Define a function-backended global variable.
-/// @param[in]   q  Name of the variable.
-/// @param[in]   w  Variable storage.
-/// @param[in]   e  Getter function.
-/// @param[in]   r  Setter function.
-/// @see         rb_define_virtual_var (... truncated)

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

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