Skip to content

Move extensions/include/cmark-gfm-core-extensions.h cpp includes out of extern "C" block #81

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

Open
wants to merge 1 commit into
base: gfm
Choose a base branch
from

Conversation

z2oh
Copy link

@z2oh z2oh commented Aug 19, 2025

When the extern "C" block is emitted, the compiler complains about these includes.

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

I thought that we did this change already?

@compnerd
Copy link
Member

@swift-ci please test

@compnerd
Copy link
Member

#58 did this but seems that it was partial.

@compnerd
Copy link
Member

CC: @QuietMisdreavus

#ifdef __cplusplus
extern "C" {
#endif

#include "cmark-gfm-extension_api.h"
#include "export.h"

Choose a reason for hiding this comment

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

Should we just move all the header includes out of the extern "C" block? I guess i'm not sure what the precise semantics are that Clang is complaining about, so i'm not sure why this header include is fine while the others are not.

It looks like the module.modulemap file for the base cmark-gfm library doesn't include this header, which is likely why it's not considered a problem. What's stopping us from adding export.h to that module map?

Copy link
Author

Choose a reason for hiding this comment

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

I just moved the smallest set that the compiler complained about, but I think you're right. I'll try adding export.h to the module map and see what happens, and then move that header outside of the block as well.

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.

3 participants