summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2022-11-01 15:40:52 +0100
committer卜部昌平 <shyouhei@ruby-lang.org>2022-12-06 14:55:05 +0900
commit81e274c9907c9ddb8fbf8ad0c28cd2b39d6e1639 (patch)
tree46e70835dd6f161e8ca947e2127fde2701a1d610
parent8c62b360418a9dc5038b43edc4d489a0d94ccb17 (diff)
downloadruby-81e274c9907c9ddb8fbf8ad0c28cd2b39d6e1639.tar.gz
[DOC] Improve documentation to RB_ALLOCVv3_2_0_rc1
Although the storage of the opaque Ruby object is an array of VALUEs, the intention of RB_ALLOCV is to allocate bytes of memory.
-rw-r--r--include/ruby/internal/memory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/ruby/internal/memory.h b/include/ruby/internal/memory.h
index 0f59262a91..6884db195d 100644
--- a/include/ruby/internal/memory.h
+++ b/include/ruby/internal/memory.h
@@ -287,12 +287,12 @@ typedef uint128_t DSIZE_T;
RBIMPL_CAST((type *)alloca(rbimpl_size_mul_or_raise(sizeof(type), (n))))
/**
- * Identical to #RB_ALLOCV_N(), except it implicitly assumes the type of array
- * is ::VALUE.
+ * Identical to #RB_ALLOCV_N(), except that it allocates a number of bytes and
+ * returns a void* .
*
* @param v A variable to hold the just-in-case opaque Ruby object.
* @param n Size of allocation, in bytes.
- * @return An array of `n` bytes of ::VALUE.
+ * @return A void pointer to `n` bytes storage.
* @note `n` may be evaluated twice.
*/
#define RB_ALLOCV(v, n) \