mirror of
https://github.com/ziglang/zig.git
synced 2025-12-07 14:53:08 +00:00
lib: Reword documentation for realloc to clarify size
"byte size" is confusing. Clarify we mean number of items.
This commit is contained in:
parent
17928ef58b
commit
d4e5d1e15c
@ -358,8 +358,10 @@ pub fn remap(self: Allocator, allocation: anytype, new_len: usize) t: {
|
|||||||
return mem.bytesAsSlice(T, new_memory);
|
return mem.bytesAsSlice(T, new_memory);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This function requests a new byte size for an existing allocation, which
|
/// This function requests a new size for an existing allocation, which
|
||||||
/// can be larger, smaller, or the same size as the old memory allocation.
|
/// can be larger, smaller, or the same size as the old memory allocation.
|
||||||
|
/// The result is an array of `new_n` items of the same type as the existing
|
||||||
|
/// allocation.
|
||||||
///
|
///
|
||||||
/// If `new_n` is 0, this is the same as `free` and it always succeeds.
|
/// If `new_n` is 0, this is the same as `free` and it always succeeds.
|
||||||
///
|
///
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user