[
https://issues.apache.org/jira/browse/ARROW-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16400848#comment-16400848
]
Antoine Pitrou commented on ARROW-2317:
---------------------------------------
What happens if you add a {{extern "C++"}} block surrounding the declarations
in {{pyarrow.h}}?
Like this:
{code}
diff --git a/cpp/src/arrow/python/pyarrow.h b/cpp/src/arrow/python/pyarrow.h
index e637627..2980541 100644
--- a/cpp/src/arrow/python/pyarrow.h
+++ b/cpp/src/arrow/python/pyarrow.h
@@ -24,6 +24,8 @@
#include "arrow/util/visibility.h"
+extern "C++" {
+
namespace arrow {
class Array;
@@ -80,5 +82,6 @@ ARROW_EXPORT PyObject* wrap_record_batch(const
std::shared_ptr<RecordBatch>& bat
} // namespace py
} // namespace arrow
+} // extern "C++"
#endif // ARROW_PYTHON_PYARROW_H
{code}
> [Python] fix C linkage warning
> ------------------------------
>
> Key: ARROW-2317
> URL: https://issues.apache.org/jira/browse/ARROW-2317
> Project: Apache Arrow
> Issue Type: Bug
> Reporter: Viktor Gal
> Priority: Minor
>
> When using pyarrow interface from a c++ library one will get the following
> compiler warning:
> {quote}{{warning: 'unwrap_table' has C-linkage specified, but returns
> user-defined type 'arrow::Status' which is incompatible with C
> [-Wreturn-type-c-linkage]}}
> {{ARROW_EXPORT Status unwrap_table(PyObject* table, std::shared_ptr<Table>*
> out);}}
> {quote}
> This is due to a Cython artifact.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)