aboutsummaryrefslogtreecommitdiff
path: root/lib/std/mem/Allocator.zig
diff options
context:
space:
mode:
authorSilver <silver@silv.re>2021-11-07 10:53:35 +0000
committerAndrew Kelley <andrew@ziglang.org>2021-11-09 13:41:38 -0500
commit9bb7ff68ccab8700cb787a83359df02a5bb4370f (patch)
treea6671ffc386f8cabe1e0cb1280e932514ec35228 /lib/std/mem/Allocator.zig
parente04ab39036ebbae02e3f3007ffc9f1bd6d44c7a3 (diff)
downloadzig-9bb7ff68ccab8700cb787a83359df02a5bb4370f.tar.gz
zig-9bb7ff68ccab8700cb787a83359df02a5bb4370f.zip
std: Publicize Allocator.reallocBytes
This is useful when dealing with runtime-known alignments, eg. interfacing with C code that accepts custom allocation callbacks. Closes #9394
Diffstat (limited to 'lib/std/mem/Allocator.zig')
-rw-r--r--lib/std/mem/Allocator.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/mem/Allocator.zig b/lib/std/mem/Allocator.zig
index a76c27f5a0..d6ebed2c22 100644
--- a/lib/std/mem/Allocator.zig
+++ b/lib/std/mem/Allocator.zig
@@ -80,7 +80,7 @@ pub fn noResize(
/// as `old_mem` was when `reallocFn` is called. The bytes of
/// `return_value[old_mem.len..]` have undefined values.
/// The returned slice must have its pointer aligned at least to `new_alignment` bytes.
-fn reallocBytes(
+pub fn reallocBytes(
self: *Allocator,
/// Guaranteed to be the same as what was returned from most recent call to
/// `allocFn` or `resizeFn`.