-
Notifications
You must be signed in to change notification settings - Fork 396
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
iox-#2327 Replace macro ENUM with IOX_ENUM and CLASS with IOX_CLASS #2328
iox-#2327 Replace macro ENUM with IOX_ENUM and CLASS with IOX_CLASS #2328
Conversation
After this review goes through, I may make another PR to redo this change for version v2.90 to integrate with our pipeline. |
62e4395
to
c5c7fe6
Compare
iceoryx_binding_c/include/iceoryx_binding_c/internal/c2cpp_binding.h
Outdated
Show resolved
Hide resolved
There is no branch for v2.90. It is only a tag and therefore there is nothing a PR could be merged to. If you need this for your internal pipeline, you need to either carry a patch or update to the latest main branch. |
cfc3445
to
4523cb2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2328 +/- ##
==========================================
+ Coverage 78.07% 78.23% +0.15%
==========================================
Files 432 433 +1
Lines 15920 16034 +114
Branches 2303 2302 -1
==========================================
+ Hits 12430 12544 +114
Misses 2644 2644
Partials 846 846
Flags with carried forward coverage won't be shown. Click here to find out more.
|
edc7718
to
a5f5a64
Compare
…IOX_C_CLASS Signed-off-by: Michael Bentley <[email protected]>
a5f5a64
to
21f6d09
Compare
@mikebentley15 thanks very much for your contribution. I think I already mentioned it above, we are currently working on iceoryx2 which is written in Rust and will have C and C++ bindings with the next release. We will also present it in the iceoryx developer meetup next week on Tuesday. We would also be happy to hear what you are using iceoryx for :) |
@elBoberido, you're welcome! It's pretty cool that you have iceoryx2 implemented in Rust. I'm using iceoryx indirectly via Cyclone DDS. Cheers! |
Notes for Reviewer
The macros
ENUM
andCLASS
are very generic names and can potentially cause naming conflicts with user code or other third-party libraries. These macros are intended to make the headers compatible with both C and C++. TheENUM
macro is unnecessary since theenum
prefix for variable declarations is required in C and optional in C++. TheCLASS
macro is required to match the Microsoft C++ ABI -- defined asclass
when in C++ mode andstruct
when in C mode.This PR seeks to solve this by
ENUM
macro, replacing its use with theenum
keyword.CLASS
macro toIOX_C_CLASS
to reduce likelihood of naming conflictssed -i -e 's/\<CLASS\>/IOX_C_CLASS/g' $(find -type f)
CLASS
was in a comment; not referencing the macro.See issue #2327 for a minimal example to reproduce the issue and existing workarounds.
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References