mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Doxygen terminology update [ci skip]
Follow N2328 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2328.pdf
This commit is contained in:
parent
5d8bcc4870
commit
cc36e499f9
1 changed files with 12 additions and 12 deletions
|
@ -55,7 +55,7 @@ RBIMPL_ATTR_RESTRICT()
|
||||||
RBIMPL_ATTR_RETURNS_NONNULL()
|
RBIMPL_ATTR_RETURNS_NONNULL()
|
||||||
RBIMPL_ATTR_ALLOC_SIZE((1))
|
RBIMPL_ATTR_ALLOC_SIZE((1))
|
||||||
/**
|
/**
|
||||||
* Allocates an object instance. It is largely the same as system malloc(),
|
* Allocates a storage instance. It is largely the same as system malloc(),
|
||||||
* except:
|
* except:
|
||||||
*
|
*
|
||||||
* - It raises Ruby exceptions instead of returning NULL, and
|
* - It raises Ruby exceptions instead of returning NULL, and
|
||||||
|
@ -142,19 +142,19 @@ RBIMPL_ATTR_NODISCARD()
|
||||||
RBIMPL_ATTR_RETURNS_NONNULL()
|
RBIMPL_ATTR_RETURNS_NONNULL()
|
||||||
RBIMPL_ATTR_ALLOC_SIZE((2))
|
RBIMPL_ATTR_ALLOC_SIZE((2))
|
||||||
/**
|
/**
|
||||||
* Resize the object instance.
|
* Resize the storage instance.
|
||||||
*
|
*
|
||||||
* @param[in] ptr A valid pointer to an object instance that was
|
* @param[in] ptr A valid pointer to a storage instance that was
|
||||||
* previously returned from either ruby_xmalloc(),
|
* previously returned from either ruby_xmalloc(),
|
||||||
* ruby_xmalloc2(), ruby_xcalloc(), ruby_xrealloc(),
|
* ruby_xmalloc2(), ruby_xcalloc(), ruby_xrealloc(),
|
||||||
* or ruby_xrealloc2().
|
* or ruby_xrealloc2().
|
||||||
* @param[in] newsiz Requested new amount of memory.
|
* @param[in] newsiz Requested new amount of memory.
|
||||||
* @throw rb_eMemError No space left for `newsiz` bytes allocation.
|
* @throw rb_eMemError No space left for `newsiz` bytes allocation.
|
||||||
* @retval ptr In case the function returns the passed pointer
|
* @retval ptr In case the function returns the passed pointer
|
||||||
* as-is, the object instance that the pointer holds
|
* as-is, the storage instance that the pointer holds
|
||||||
* is either grown or shrunken to have at least
|
* is either grown or shrunken to have at least
|
||||||
* `newsiz` bytes.
|
* `newsiz` bytes.
|
||||||
* @retval otherwise A valid pointer to a newly allocated object
|
* @retval otherwise A valid pointer to a newly allocated storage
|
||||||
* instance which has at least `newsiz` bytes width,
|
* instance which has at least `newsiz` bytes width,
|
||||||
* and holds previous contents of `ptr`. In this
|
* and holds previous contents of `ptr`. In this
|
||||||
* case `ptr` is invalidated as if it was passed to
|
* case `ptr` is invalidated as if it was passed to
|
||||||
|
@ -182,8 +182,8 @@ RBIMPL_ATTR_NODISCARD()
|
||||||
RBIMPL_ATTR_RETURNS_NONNULL()
|
RBIMPL_ATTR_RETURNS_NONNULL()
|
||||||
RBIMPL_ATTR_ALLOC_SIZE((2,3))
|
RBIMPL_ATTR_ALLOC_SIZE((2,3))
|
||||||
/**
|
/**
|
||||||
* Identical to ruby_xrealloc(), except it resizes the given object instance to
|
* Identical to ruby_xrealloc(), except it resizes the given storage instance
|
||||||
* `newelems` * `newsiz` bytes. This is needed because the multiplication
|
* to `newelems` * `newsiz` bytes. This is needed because the multiplication
|
||||||
* could integer overflow. On such situations Ruby does not try to touch the
|
* could integer overflow. On such situations Ruby does not try to touch the
|
||||||
* contents of argument pointer at all but raises Ruby level exceptions
|
* contents of argument pointer at all but raises Ruby level exceptions
|
||||||
* instead. If there is no integer overflow the behaviour is exactly the same
|
* instead. If there is no integer overflow the behaviour is exactly the same
|
||||||
|
@ -192,7 +192,7 @@ RBIMPL_ATTR_ALLOC_SIZE((2,3))
|
||||||
* This is roughly the same as reallocarray() function that OpenBSD
|
* This is roughly the same as reallocarray() function that OpenBSD
|
||||||
* etc. provides, but also interacts with our GC.
|
* etc. provides, but also interacts with our GC.
|
||||||
*
|
*
|
||||||
* @param[in] ptr A valid pointer to an object instance that was
|
* @param[in] ptr A valid pointer to a storage instance that was
|
||||||
* previously returned from either ruby_xmalloc(),
|
* previously returned from either ruby_xmalloc(),
|
||||||
* ruby_xmalloc2(), ruby_xcalloc(), ruby_xrealloc(),
|
* ruby_xmalloc2(), ruby_xcalloc(), ruby_xrealloc(),
|
||||||
* or ruby_xrealloc2().
|
* or ruby_xrealloc2().
|
||||||
|
@ -201,10 +201,10 @@ RBIMPL_ATTR_ALLOC_SIZE((2,3))
|
||||||
* @throw rb_eMemError No space left for allocation.
|
* @throw rb_eMemError No space left for allocation.
|
||||||
* @throw rb_eArgError `newelems` * `newsiz` would overflow.
|
* @throw rb_eArgError `newelems` * `newsiz` would overflow.
|
||||||
* @retval ptr In case the function returns the passed pointer
|
* @retval ptr In case the function returns the passed pointer
|
||||||
* as-is, the object instance that the pointer holds
|
* as-is, the storage instance that the pointer holds
|
||||||
* is either grown or shrunken to have at least
|
* is either grown or shrunken to have at least
|
||||||
* `newelems` * `newsiz` bytes.
|
* `newelems` * `newsiz` bytes.
|
||||||
* @retval otherwise A valid pointer to a newly allocated object
|
* @retval otherwise A valid pointer to a newly allocated storage
|
||||||
* instance which has at least `newelems` * `newsiz`
|
* instance which has at least `newelems` * `newsiz`
|
||||||
* bytes width, and holds previous contents of `ptr`.
|
* bytes width, and holds previous contents of `ptr`.
|
||||||
* In this case `ptr` is invalidated as if it was
|
* In this case `ptr` is invalidated as if it was
|
||||||
|
@ -230,12 +230,12 @@ RBIMPL_ATTR_NOEXCEPT(realloc(ptr, newelems * newsiz))
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deallocates an object instance.
|
* Deallocates a storage instance.
|
||||||
*
|
*
|
||||||
* @param[out] ptr Either NULL, or a valid pointer previously returned from
|
* @param[out] ptr Either NULL, or a valid pointer previously returned from
|
||||||
* one of ruby_xmalloc(), ruby_xmalloc2(), ruby_xcalloc(),
|
* one of ruby_xmalloc(), ruby_xmalloc2(), ruby_xcalloc(),
|
||||||
* ruby_xrealloc(), or ruby_xrealloc2().
|
* ruby_xrealloc(), or ruby_xrealloc2().
|
||||||
* @warning Every single object instance that was previously allocated by
|
* @warning Every single storage instance that was previously allocated by
|
||||||
* either ruby_xmalloc(), ruby_xmalloc2(), ruby_xcalloc(),
|
* either ruby_xmalloc(), ruby_xmalloc2(), ruby_xcalloc(),
|
||||||
* ruby_xrealloc(), or ruby_xrealloc2() shall be invalidated
|
* ruby_xrealloc(), or ruby_xrealloc2() shall be invalidated
|
||||||
* exactly once by either passing it to ruby_xfree(), or passing
|
* exactly once by either passing it to ruby_xfree(), or passing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue