GH-51456: [C++] Make ABI independent of ARROW_EXTRA_ERROR_CONTEXT - #51458
Merged
Merged
Conversation
|
|
Member
Author
taepper
approved these changes
Sep 22, 2026
taepper
left a comment
Contributor
There was a problem hiding this comment.
This reduces the usage of ARROW_EXTRA_ERROR_CONTEXT in the codebase to this single instance:
#ifdef ARROW_EXTRA_ERROR_CONTEXT
/// \brief Return with given status if condition is met.
# define ARROW_RETURN_IF_(condition, status, expr) \
do { \
if (ARROW_PREDICT_FALSE(condition)) { \
::arrow::Status _st = (status); \
_st.AddContextLine(__FILE__, __LINE__, expr); \
return _st; \
} \
} while (0)
#else
# define ARROW_RETURN_IF_(condition, status, _) \
do { \
if (ARROW_PREDICT_FALSE(condition)) { \
return (status); \
} \
} while (0)
#endif // ARROW_EXTRA_ERROR_CONTEXT
Which is exactly what I would expect
HuaHuaY
reviewed
Sep 22, 2026
pitrou
force-pushed
the
gh51456-abi-macro
branch
from
September 22, 2026 12:44
301b2fd to
1aec581
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are included in this PR?
Allow applications compiled with
ARROW_EXTRA_ERROR_CONTEXTenabled to link against libarrow compiled withARROW_EXTRA_ERROR_CONTEXTdisabled, and vice-versa.Also improve unit tests slightly.
Are these changes tested?
The original issue was tested manually.
Are there any user-facing changes?
No.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: