summaryrefslogtreecommitdiff
path: root/protocols/Tox/libtox/src/toxcore/mem.h
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-05-25 19:12:13 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-05-25 19:12:13 +0300
commita15f120c4ff2824b71301d5c270288b74bb2aa37 (patch)
treefd3ea82de8d92d7cd2795e931b584d9c4857cb89 /protocols/Tox/libtox/src/toxcore/mem.h
parent5e0856749a27b186dd23273b238dd176922f6f1a (diff)
libtox: update to 2.2.1
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))`.