aboutsummaryrefslogtreecommitdiffstats
path: root/libsimple/realloc.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libsimple/realloc.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/libsimple/realloc.h b/libsimple/realloc.h
index 4f780d5..37d4031 100644
--- a/libsimple/realloc.h
+++ b/libsimple/realloc.h
@@ -25,6 +25,8 @@
* `alignof(max_align_t)`; `NULL` on failure
* @throws EINVAL `n` is 0
* @throws ENOMEM Could not allocated enough memory
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__)))
void *libsimple_vreallocn(void *, size_t, va_list);
@@ -57,6 +59,8 @@ void *libsimple_vreallocn(void *, size_t, va_list);
* `alignof(max_align_t)`; `NULL` on failure
* @throws EINVAL `n` is 0
* @throws ENOMEM Could not allocated enough memory
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__)))
inline void *
@@ -94,6 +98,8 @@ libsimple_reallocn(void *ptr__, size_t n__, ... /*, (size_t)0 */)
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__alloc_size__(3), __warn_unused_result__, __returns_nonnull__)))
void *libsimple_enrealloc(int, void *, size_t);
@@ -129,6 +135,8 @@ void *libsimple_enrealloc(int, void *, size_t);
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__, __returns_nonnull__)))
void *libsimple_envreallocn(int, void *, size_t, va_list);
@@ -164,6 +172,8 @@ void *libsimple_envreallocn(int, void *, size_t, va_list);
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__, __returns_nonnull__)))
inline void *
@@ -200,6 +210,8 @@ libsimple_enreallocn(int status__, void *ptr__, size_t n__, ... /*, (size_t)0 */
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__alloc_size__(2), __warn_unused_result__, __returns_nonnull__)))
inline void *
@@ -238,6 +250,8 @@ libsimple_erealloc(void *ptr__, size_t n__)
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__, __returns_nonnull__)))
inline void *
@@ -276,6 +290,8 @@ libsimple_evreallocn(void *ptr__, size_t n__, va_list ap__)
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.0
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__, __returns_nonnull__)))
inline void *
@@ -312,6 +328,8 @@ libsimple_ereallocn(void *ptr__, size_t n__, ... /*, (size_t)0 */)
* `alignof(max_align_t)`; `NULL` on failure
* @throws EINVAL `n` is 0
* @throws ENOMEM Could not allocated enough memory
+ *
+ * @since 1.2
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__alloc_size__(2), __warn_unused_result__)))
inline void *
@@ -350,6 +368,8 @@ libsimple_reallocf(void *ptr__, size_t n__)
* `alignof(max_align_t)`; `NULL` on failure
* @throws EINVAL `n` or `m` is 0
* @throws ENOMEM Could not allocated enough memory
+ *
+ * @since 1.2
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__alloc_size__(2, 3), __warn_unused_result__)))
inline void *
@@ -391,6 +411,8 @@ libsimple_reallocarray(void *ptr__, size_t n__, size_t m__)
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.2
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__alloc_size__(3, 4), __warn_unused_result__, __returns_nonnull__)))
void *libsimple_enreallocarray(int, void *, size_t, size_t);
@@ -424,6 +446,8 @@ void *libsimple_enreallocarray(int, void *, size_t, size_t);
* @return Either `ptr` or a unique pointer with at least
* the specified size and with the alignment
* `alignof(max_align_t)`
+ *
+ * @since 1.2
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__alloc_size__(2, 3), __warn_unused_result__, __returns_nonnull__)))
inline void *
@@ -459,6 +483,8 @@ libsimple_ereallocarray(void *ptr__, size_t n__, size_t m__)
* `alignof(max_align_t)`; `NULL` on failure
* @throws EINVAL `n` or `m` is 0
* @throws ENOMEM Could not allocated enough memory
+ *
+ * @since 1.2
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__alloc_size__(2, 3), __warn_unused_result__)))
inline void *
@@ -498,6 +524,8 @@ libsimple_reallocarrayf(void *ptr__, size_t n__, size_t m__)
* `alignof(max_align_t)`; `NULL` on failure
* @throws EINVAL `n` is 0
* @throws ENOMEM Could not allocated enough memory
+ *
+ * @since 1.2
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__)))
inline void *
@@ -537,6 +565,8 @@ libsimple_vreallocfn(void *ptr__, size_t n__, va_list ap__)
* `alignof(max_align_t)`; `NULL` on failure
* @throws EINVAL `n` is 0
* @throws ENOMEM Could not allocated enough memory
+ *
+ * @since 1.2
*/
LIBSIMPLE_GCC_ONLY__(__attribute__((__warn_unused_result__)))
inline void *