tustvold commented on code in PR #5070:
URL: https://github.com/apache/arrow-rs/pull/5070#discussion_r1391414430


##########
arrow/src/pyarrow.rs:
##########
@@ -262,9 +263,10 @@ impl FromPyArrow for ArrayData {
             validate_pycapsule(array_capsule, "arrow_array")?;
 
             let schema_ptr = unsafe { 
schema_capsule.reference::<FFI_ArrowSchema>() };
-            let array_ptr = unsafe { 
array_capsule.reference::<FFI_ArrowArray>() };
+            let array_ptr = array_capsule.pointer() as *mut FFI_ArrowArray;
+            let array_mut = unsafe { array_ptr.as_mut() };

Review Comment:
   FWIW you could use https://doc.rust-lang.org/std/ptr/fn.replace.html as 
we're already playing with pointers here



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