kevingurney commented on code in PR #45973:
URL: https://github.com/apache/arrow/pull/45973#discussion_r2029335577
##########
matlab/doc/matlab_interface_for_apache_arrow_design.md:
##########
@@ -205,21 +212,18 @@ The example code below is adapted from the
[`test_cffi.py` test cases for PyArro
>> PA = py.pyarrow.array([1, 2, 3, 4, 5]);
% Create ArrowArray and ArrowSchema C-style structs adhering to the Arrow C
Data Interface format.
->> array = py.pyarrow.cffi.ffi.new("struct ArrowArray*")
-
->> arrayMemoryAddress = py.int(py.pyarrow.cffi.ffi.cast("uintptr_t", array));
-
->> schema = py.pyarrow.cffi.ffi.new("struct ArrowSchema*")
-
->> schemaMemoryAddress = py.int(py.pyarrow.cffi.ffi.cast("uintptr_t",
schema));
+>> cArray = arrow.c.Array();
+>> cSchema = arrow.c.Schema();
% Export the pyarrow.Array to the C Data Interface format, populating the
required ArrowArray and ArrowShema structs.
->> PA.export_to_c(arrayMemoryAddress, schemaMemoryAddress)
+>> pyrun("import pyarrow as pa; PA._export_to_c(arrayMemoryAddress,
schemaMemoryAddress)", PA=PA, arrayMemoryAddress=cArray.Address,
schemaMemoryAddress=cSchema.Address);
Review Comment:
Marking as resolved.
--
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]