-
Notifications
You must be signed in to change notification settings - Fork 36
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
Remove unnecessary extern "C"
#33
Conversation
Signed-off-by: Dan Rose <[email protected]>
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.
Yeah, I wondered about that, and I have to admit that I cargo-culted it when I did rcl_logging_spdlog.cpp
. As long as CI comes back green (including tests in at least one package that uses this code), I'm happy.
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.
Actually, I think I'm totally wrong.
The reason we need the extern "C"
is that we are filling in a C API, so we need to use C symbol names, not C++ symbol names. So I'm pretty sure this isn't going to work as-is.
The language linkage is only needed on the declaration, not the definition. That’s why I don’t think it’s necessary here. |
Ah, good point. I didn't realize that. Nothing to do with this PR, but this only works because the APIs here define their own "logging_interface" header files. The one that is located at https://github.com/ros2/rcl/blob/51886399ddc67e241521bad81975d365a4e330df/rcl/include/rcl/logging_external_interface.h doesn't have the proper |
You're right. That's... really fragile... |
I don't feel comfortable merging this until the the interface declarations are unified. |
That's fine, we can clean that up and then think about merging this. |
Just as an FYI, the reason that this isn't trivial to fix is that we can't have the |
I think that's exactly what should be done. Here are the dependencies on rcl. I don't know what belongs in the different namespaces
|
I'm closing this out, because the changes here were covered by #41. Please feel free to reopen if you think this is in error. |
Signed-off-by: Dan Rose [email protected]