paleolimbot commented on a change in pull request #11919:
URL: https://github.com/apache/arrow/pull/11919#discussion_r766656781



##########
File path: r/src/py-to-r.cpp
##########
@@ -21,6 +21,38 @@
 
 #include <arrow/c/bridge.h>
 
+// [[arrow::export]]
+double external_pointer_addr_double(SEXP external_pointer) {
+  // potentially lossy conversion to double needed for the current
+  // implementation of import/export to Python
+  return reinterpret_cast<uintptr_t>(R_ExternalPtrAddr(external_pointer));

Review comment:
       I think this one needs to stay like this because it's the exact code 
that was previously used to convert a `Pointer<>` to `SEXP` (and is what the 
Python library relies on to recreate the pointer).




-- 
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]


Reply via email to