Rich-T-kid commented on code in PR #10932:
URL: https://github.com/apache/arrow-rs/pull/10932#discussion_r3910612100
##########
arrow-buffer/src/bytes.rs:
##########
@@ -134,7 +134,15 @@ impl Bytes {
/// Returns `Err` if the memory was allocated with a custom allocator,
/// or the call to `realloc` failed, for whatever reason.
/// In case of `Err`, the [`Bytes`] will remain as it was (i.e. have the
old size).
- pub(crate) fn try_realloc(&mut self, new_len: usize) -> Result<(), ()> {
+ ///
+ /// `on_reallocated` is called after [`Bytes`] has updated its internal
+ /// pointer, but before resizing the memory reservation, which may call
user
+ /// code.
+ pub(crate) fn try_realloc(
+ &mut self,
+ new_len: usize,
+ on_reallocated: impl FnOnce(NonNull<u8>),
+ ) -> Result<(), ()> {
Review Comment:
this isn't public + the only call site of this is in `buffer/immutable.rs`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]