Skip to content

replace "context" macro with inline function#5

Merged
gauravharsha merged 3 commits into
mainfrom
fix/context-macro-conflict
May 12, 2026
Merged

replace "context" macro with inline function#5
gauravharsha merged 3 commits into
mainfrom
fix/context-macro-conflict

Conversation

@gauravharsha
Copy link
Copy Markdown
Contributor

Replace #define context mpi_context::context() in mpi_shared.h with a proper inline function inline mpi_context& context(). The macro was leaking into downstream translation units and conflicting with the context identifier from newer versions of h5pp.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes a preprocessor macro (context) from mpi_shared.h—which leaked into downstream translation units and could rewrite unrelated identifiers—and replaces it with a namespaced inline accessor function to avoid collisions (notably with newer h5pp).

Changes:

  • Removed #define context mpi_context::context() from src/green/utils/mpi_shared.h.
  • Added green::utils::context() inline function returning mpi_context::context().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/green/utils/mpi_shared.h
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.09%. Comparing base (c6f8b5b) to head (bbd4270).

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #5      +/-   ##
==========================================
+ Coverage   70.95%   71.09%   +0.13%     
==========================================
  Files           3        4       +1     
  Lines         210      211       +1     
==========================================
+ Hits          149      150       +1     
  Misses         61       61              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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