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

Make lib usable with C++ #64

Merged
merged 1 commit into from
Sep 7, 2024
Merged

Make lib usable with C++ #64

merged 1 commit into from
Sep 7, 2024

Conversation

jwupf
Copy link
Contributor

@jwupf jwupf commented Sep 6, 2024

Add 'extern "C"' to function definitions to inhibit name mangling if used in C++ sources.
Closes #63.

Checklist

Thanks a lot for your contribution!
Please tick off the following:

  • Tests run successfully (i.e. make test)
    • using the CC65 compiler
    • using the LLVM/Clang compiler
  • Doxygen style tags are used for public API
  • Source code is properly formatted; run e.g. clang-format -i <file>
  • I agree to the License of this repository

I did build with CC65. I can building with Clang and run the tests after setting up my environment for that(if I find the time). But I could use the lib with the changes in my application development environment. I have no such environment setup for this lib, yet.

I did not change comments, so I did not tick that item off.

Add 'extern "C"' to function definitions to inhibit name mangling
if used in C++ sources.
Copy link
Collaborator

@mlund mlund left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good! A minor thing: there's unrelated code-formatting included in the commits. It seems harmless, but please double-check that it adheres to clang-format, or better change this in in a separate PR.

@jwupf
Copy link
Contributor Author

jwupf commented Sep 7, 2024

That changes come from the commit hooks. I can remove them and add a PR for them.

@mlund
Copy link
Collaborator

mlund commented Sep 7, 2024

That changes come from the commit hooks. I can remove them and add a PR for them.

No need; they are pretty small so let's just merge.

@mlund mlund merged commit 7e5ec53 into MEGA65:development Sep 7, 2024
1 check passed
@jwupf
Copy link
Contributor Author

jwupf commented Sep 7, 2024

20 minutes playing with git later ... OK ;-)

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.

Including header files in C++ sources makes builds fail
2 participants