summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/libtox/src/toxcore/mem.h')
-rw-r--r--protocols/Tox/libtox/src/toxcore/mem.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/Tox/libtox/src/toxcore/mem.h b/protocols/Tox/libtox/src/toxcore/mem.h
index 7a96b6d358..6c36027ce7 100644
--- a/protocols/Tox/libtox/src/toxcore/mem.h
+++ b/protocols/Tox/libtox/src/toxcore/mem.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-3.0-or-later
- * Copyright © 2016-2018 The TokTok team.
+ * Copyright © 2016-2025 The TokTok team.
* Copyright © 2013 Tox project.
*/
@@ -46,6 +46,14 @@ const Memory *os_memory(void);
non_null() void *mem_balloc(const Memory *mem, uint32_t size);
/**
+ * @brief Resize an array of a given size for built-in types.
+ *
+ * If used for a type other than byte-sized types, `size` needs to be manually
+ * multiplied by the element size.
+ */
+non_null(1) nullable(2) void *mem_brealloc(const Memory *mem, void *ptr, uint32_t size);
+
+/**
* @brief Allocate a single object.
*
* Always use as `(T *)mem_alloc(mem, sizeof(T))`.