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

ruby-changes:64396

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Mon, 21 Dec 2020 11:01:23 +0900 (JST)
Subject: [ruby-changes:64396] 11656d15e2 (master): include/ruby/internal/xmalloc.h: doxygen tag

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

From 11656d15e2c5d5779a637eaf5f388a5c18bef629 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, 14 Dec 2020 15:17:59 +0900
Subject: include/ruby/internal/xmalloc.h: doxygen tag

`@exception` is an alias of `@throw`.  It might suite Ruby's document
because ruby uses `raise` terminology instead of `throw`. [ci skip]

diff --git a/include/ruby/internal/xmalloc.h b/include/ruby/internal/xmalloc.h
index af5e863..52eea46 100644
--- a/include/ruby/internal/xmalloc.h
+++ b/include/ruby/internal/xmalloc.h
@@ -62,7 +62,7 @@ RBIMPL_ATTR_ALLOC_SIZE((1)) https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/xmalloc.h#L62
  *   - In case of `ENOMEM` it tries to GC to make some room.
  *
  * @param[in]  size          Requested amount of memory.
- * @throw      rb_eMemError  No space left for `size` bytes allocation.
+ * @exception  rb_eMemError  No space left for `size` bytes allocation.
  * @return     A valid pointer  to an allocated storage instance;  which has at
  *             least `size` bytes width, with appropriate alignment detected by
  *             the underlying malloc() routine.
@@ -91,8 +91,8 @@ RBIMPL_ATTR_ALLOC_SIZE((1,2)) https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/xmalloc.h#L91
  *
  * @param[in]  nelems        Number of elements.
  * @param[in]  elemsiz       Size of an element.
- * @throw      rb_eMemError  No space left for allocation.
- * @throw      rb_eArgError  `nelems` * `elemsiz` would overflow.
+ * @exception  rb_eMemError  No space left for allocation.
+ * @exception  rb_eArgError  `nelems` * `elemsiz` would overflow.
  * @return     A valid pointer  to an allocated storage instance;  which has at
  *             least  `nelems`  *  `elemsiz`   bytes  width,  with  appropriate
  *             alignment detected by the underlying malloc() routine.
@@ -120,8 +120,8 @@ RBIMPL_ATTR_ALLOC_SIZE((1,2)) https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/xmalloc.h#L120
  *
  * @param[in]  nelems        Number of elements.
  * @param[in]  elemsiz       Size of an element.
- * @throw      rb_eMemError  No space left for allocation.
- * @throw      rb_eArgError  `nelems` * `elemsiz` would overflow.
+ * @exception  rb_eMemError  No space left for allocation.
+ * @exception  rb_eArgError  `nelems` * `elemsiz` would overflow.
  * @return     A valid pointer  to an allocated storage instance;  which has at
  *             least  `nelems`  *  `elemsiz`   bytes  width,  with  appropriate
  *             alignment detected by the underlying calloc() routine.
@@ -149,7 +149,7 @@ RBIMPL_ATTR_ALLOC_SIZE((2)) https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/xmalloc.h#L149
  *                           ruby_xmalloc2(),  ruby_xcalloc(), ruby_xrealloc(),
  *                           or ruby_xrealloc2().
  * @param[in]  newsiz        Requested new amount of memory.
- * @throw      rb_eMemError  No space left for `newsiz` bytes allocation.
+ * @exception  rb_eMemError  No space left for `newsiz` bytes allocation.
  * @retval     ptr           In case  the function  returns the  passed pointer
  *                           as-is, the storage instance that the pointer holds
  *                           is  either  grown or  shrunken  to  have at  least
@@ -198,8 +198,8 @@ RBIMPL_ATTR_ALLOC_SIZE((2,3)) https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/xmalloc.h#L198
  *                           or ruby_xrealloc2().
  * @param[in]  newelems      Requested new number of elements.
  * @param[in]  newsiz        Requested new size of each element.
- * @throw      rb_eMemError  No space left for  allocation.
- * @throw      rb_eArgError  `newelems` * `newsiz` would overflow.
+ * @exception  rb_eMemError  No space left for  allocation.
+ * @exception  rb_eArgError  `newelems` * `newsiz` would overflow.
  * @retval     ptr           In case  the function  returns the  passed pointer
  *                           as-is, the storage instance that the pointer holds
  *                           is  either  grown or  shrunken  to  have at  least
-- 
cgit v0.10.2


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

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