[ https://issues.apache.org/jira/browse/ARROW-2091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16352649#comment-16352649 ]
Jun commented on ARROW-2091: ---------------------------- Thanks a lot! I'll follow those links. It will be very useful if these info are available in documentation. > 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 (v7.6.3#76005)