aboutsummaryrefslogtreecommitdiffstats
path: root/libsimple/realloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsimple/realloc.h')
-rw-r--r--libsimple/realloc.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/libsimple/realloc.h b/libsimple/realloc.h
index b02c08a..0d487f5 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__)))
static 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__)))
static 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__)))
static inline void *libsimple_erealloc(void *__ptr, size_t __n)
@@ -235,6 +247,8 @@ static inline void *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__)))
static inline void *libsimple_evreallocn(void *__ptr, size_t __n, va_list __ap)
@@ -270,6 +284,8 @@ static inline void *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__)))
static inline void *
@@ -306,6 +322,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__)))
static inline void *
@@ -344,6 +362,8 @@ libsimple_reallocf(void *__ptr, size_t __n) /* TODO test */
* `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__)))
static inline void *
@@ -385,6 +405,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);
@@ -418,6 +440,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__)))
static inline void *libsimple_ereallocarray(void *__ptr, size_t __n, size_t __m)
@@ -450,6 +474,8 @@ static inline void *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__)))
static inline void *
@@ -489,6 +515,8 @@ libsimple_reallocarrayf(void *__ptr, size_t __n, size_t __m) /* TODO test */
* `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__)))
static inline void *
@@ -528,6 +556,8 @@ libsimple_vreallocfn(void *__ptr, size_t __n, va_list __ap) /* TODO test (reallo
* `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__)))
static inline void *