Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

xhochy
Copy link
Member

@xhochy xhochy commented Oct 28, 2018

This simply updates the file. I'll defer the removal of public to https://issues.apache.org/jira/browse/ARROW-3641

@codecov-io
Copy link

Codecov Report

Merging #2854 into master will increase coverage by 0.85%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
cpp/src/arrow/python/pyarrow_api.h 82.75% <100%> (+2.16%) ⬆️
rust/src/record_batch.rs
go/arrow/array/table.go
rust/src/util/bit_util.rs
go/arrow/math/uint64_amd64.go
go/arrow/internal/testing/tools/bool.go
go/arrow/internal/bitutil/bitutil.go
go/arrow/memory/memory_avx2_amd64.go
go/arrow/array/null.go
go/arrow/datatype_nested.go
... and 53 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d61988d...10b429e. Read the comment docs.

Copy link
Member

@pitrou pitrou left a 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"
Copy link
Member

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 &);
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants