authorgravatar for silver@silv.reSilver <silver@silv.re> 2021-11-07 10:53:35+00:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-09 13:41:38-05:00
log9bb7ff68ccab8700cb787a83359df02a5bb4370f
treea6671ffc386f8cabe1e0cb1280e932514ec35228
parente04ab39036ebbae02e3f3007ffc9f1bd6d44c7a3

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

1 files changed, 1 insertions(+), 1 deletions(-)

lib/std/mem/Allocator.zig+1-1
......@@ -80,7 +80,7 @@ pub fn noResize(
8080/// as `old_mem` was when `reallocFn` is called. The bytes of
8181/// `return_value[old_mem.len..]` have undefined values.
8282/// The returned slice must have its pointer aligned at least to `new_alignment` bytes.
83fn reallocBytes(
83pub fn reallocBytes(
8484 self: *Allocator,
8585 /// Guaranteed to be the same as what was returned from most recent call to
8686 /// `allocFn` or `resizeFn`.