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

ruby-changes:67855

From: =E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3 <ko1@a...>
Date: Fri, 10 Sep 2021 20:03:12 +0900 (JST)
Subject: [ruby-changes:67855] 8fa82cd272 (master): include/ruby/internal/arithmetic/intptr_t.h: add doxygen

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

From 8fa82cd2722698880718f5b2fec948edcbf55850 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, 25 Jan 2021 09:23:09 +0900
Subject: include/ruby/internal/arithmetic/intptr_t.h: add doxygen

Must not be a bad idea to improve documents. [ci skip]
---
 include/ruby/internal/arithmetic/intptr_t.h | 36 +++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/include/ruby/internal/arithmetic/intptr_t.h b/include/ruby/internal/arithmetic/intptr_t.h
index 622b05a..a354f44 100644
--- a/include/ruby/internal/arithmetic/intptr_t.h
+++ b/include/ruby/internal/arithmetic/intptr_t.h
@@ -29,13 +29,45 @@ https://github.com/ruby/ruby/blob/trunk/include/ruby/internal/arithmetic/intptr_t.h#L29
 #include "ruby/internal/value.h"
 #include "ruby/internal/dllexport.h"
 
-#define rb_int_new  rb_int2inum
-#define rb_uint_new rb_uint2inum
+#define rb_int_new  rb_int2inum  /**< @alias{rb_int2inum} */
+#define rb_uint_new rb_uint2inum /**< @alias{rb_uint2inum} */
 
 RBIMPL_SYMBOL_EXPORT_BEGIN()
+
+/**
+ * Converts a C's `intptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in]  i  Arbitrary `intptr_t` value.
+ * @return     An instance of ::rb_cInteger.
+ * @note       This function always allocates Bignums, even if the given number
+ *             is small enough to fit into a Fixnum.
+ */
 VALUE rb_int2big(intptr_t i);
+
+/**
+ * Converts a C's `intptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in]  i  Arbitrary `intptr_t` value.
+ * @return     An instance of ::rb_cInteger.
+ */
 VALUE rb_int2inum(intptr_t i);
+
+/**
+ * Converts a C's `intptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in]  i  Arbitrary `intptr_t` value.
+ * @return     An instance of ::rb_cInteger.
+ * @note       This function always allocates Bignums, even if the given number
+ *             is small enough to fit into a Fixnum.
+ */
 VALUE rb_uint2big(uintptr_t i);
+
+/**
+ * Converts a C's `uintptr_t` into an instance of ::rb_cInteger.
+ *
+ * @param[in]  i  Arbitrary `uintptr_t` value.
+ * @return     An instance of ::rb_cInteger.
+ */
 VALUE rb_uint2inum(uintptr_t i);
 RBIMPL_SYMBOL_EXPORT_END()
 
-- 
cgit v1.1


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

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