Skip to content

Commit

Permalink
apacheGH-39782: [C++] Use correct (non-CPU) address of buffer in Expo…
Browse files Browse the repository at this point in the history
…rtDeviceArray
  • Loading branch information
jorisvandenbossche committed Jan 24, 2024
1 parent df83e50 commit 8bebfe4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/arrow/c/bridge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,8 @@ struct ArrayExporter {
export_.buffers_.resize(n_buffers);
std::transform(buffers_begin, data->buffers.end(), export_.buffers_.begin(),
[](const std::shared_ptr<Buffer>& buffer) -> const void* {
return buffer ? buffer->data() : nullptr;
return buffer ? reinterpret_cast<const void*>(buffer->address())
: nullptr;
});

if (need_variadic_buffer_sizes) {
Expand Down

0 comments on commit 8bebfe4

Please sign in to comment.