[
https://issues.apache.org/jira/browse/ARROW-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17659119#comment-17659119
]
Rok Mihevc commented on ARROW-2091:
-----------------------------------
This issue has been migrated to [issue
#18065|https://github.com/apache/arrow/issues/18065] on GitHub. Please see the
[migration documentation|https://github.com/apache/arrow/issues/14542] for
further details.
> Interacting with arrow/pyarrow in C++
> -------------------------------------
>
> Key: ARROW-2091
> URL: https://issues.apache.org/jira/browse/ARROW-2091
> Project: Apache Arrow
> Issue Type: Improvement
> Reporter: Jun
> Priority: Minor
>
> I've been searching online for a while but cannot figure out how to do this.
> Please help if this is already a resolved issue.
> I have a c++/python application that interacts with arrow/pyarrow. I want to
> write a C++ api that takes python objects directly and operate on them in c++.
> {code:java}
> PyObject* process_table(PyObject* table)
> {
> // process the arrow table
> std::shared_ptr<arrow::Table> tablePtr = table; // How?
> }{code}
> The problem here is: how do I extract the internal std::shared_ptr<Table>
> from the PyObject?
> Unfortunately we are not using cython in our stack, we operate on PyObject *
> directly in c++.
> I can easily do this on numpy arrays:
> {code:java}
> PyObject * process_array(PyObject* arr)
> {
> PyArray_Check(arr);
> // process the PyArrayObject directly
> ...
> }{code}
> I wonder is there any way to achieve this level of c++ integration without
> using cython? Thanks!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)