-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-3636: [C++/Python] Update arrow/python/pyarrow_api.h #2854
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2854 +/- ##
==========================================
+ Coverage 87.55% 88.41% +0.85%
==========================================
Files 410 348 -62
Lines 63486 59356 -4130
==========================================
- Hits 55586 52480 -3106
+ Misses 7828 6876 -952
+ Partials 72 0 -72 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just two things I'm curious about.
|
||
#ifndef __PYX_HAVE_API__pyarrow__lib | ||
#define __PYX_HAVE_API__pyarrow__lib | ||
#include "Python.h" | ||
#include "pyarrow_lib.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize this is Cython-generated code, but why is including this file becoming necessary? @scoder
#define DL_IMPORT(_T) _T | ||
#endif | ||
|
||
__PYX_EXTERN_C PyObject *__pyx_f_7pyarrow_3lib_pyarrow_wrap_array(std::shared_ptr< arrow::Array> const &); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious: what does it do to put extern "C"
around a function declaration that has C++ objects in its prototype? @scoder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will prevent the C++ compiler to also apply C++ name mangling on the already (Cython) mangled name, i.e. this guarantees that __pyx_f_7pyarrow_3lib_pyarrow_wrap_array
is also the exact name of the symbol in the shared object. Normally the types of the parameters would also be included in the mangled symbol name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
This simply updates the file. I'll defer the removal of
public
to https://issues.apache.org/jira/browse/ARROW-3641