pitrou commented on code in PR #39783:
URL: https://github.com/apache/arrow/pull/39783#discussion_r1465062771
##########
cpp/src/arrow/c/bridge.cc:
##########
@@ -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())
Review Comment:
Do we want to distinguish between C Data Interface and C Device Data
Interface here? We could use `buffer->data()` for the former and
`buffer->address()` for the latter - ensuring that non-CPU buffers cannot get
exported over the C Data Interface.
--
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]