Skip to content

Add explicit extern "C" #516

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

Closed

Conversation

adam-urbanczyk
Copy link

Description

I added explicit extern "C"

Fixes #515

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Requires documentation updates

Testing

Please describe the test(s) that you added and ran to verify your changes.

Checklist

  • I have read the contribution guide recently

Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.45%. Comparing base (7caf10b) to head (224afe7).
Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #516   +/-   ##
=======================================
  Coverage   72.45%   72.45%           
=======================================
  Files           9        9           
  Lines        3591     3591           
=======================================
  Hits         2602     2602           
  Misses        989      989           
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

github-actions bot commented Mar 7, 2025

clang-tidy review says "All clean, LGTM! 👍"

@@ -12,7 +12,7 @@
#include <stddef.h>
#include <stdint.h>

LLVM_CLANG_C_EXTERN_C_BEGIN
extern "C" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we include clang-c/ExternC.h which defines the macro instead?

Copy link
Author

Choose a reason for hiding this comment

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

clang-c/ExternC.h is already included, it looks like this PR does not make sense.

@Gnimuc
Copy link
Contributor

Gnimuc commented Mar 8, 2025

maybe just merge #440?

@vgvassilev
Copy link
Contributor

maybe just merge #440?

Good point. @adam-urbanczyk, can you still reproduce the issue with the master?

@anutosh491
Copy link
Collaborator

can you still reproduce the issue with the master?

Hi,

I think the problem was relevant to the win use-case
but I had seen similar issues related to symbol visibility for C API when doing an emscripten build.

Those problems are resolved now once #440 went in (check #483 (comment))
and I think it would also be addressed with other platform builds.

@vgvassilev
Copy link
Contributor

Thank you!

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.

[Bug]: extern "C" missing?
4 participants