Skip to content

Base header #3486

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 4 commits into
base: main
Choose a base branch
from
Open

Conversation

oddbookworm
Copy link
Member

Another precursor PR to #3477
The reason I want to remove so much static linkage is because you can't test functions that aren't visible to you (not even worth putting those declarations in the header, since anyone that includes the header would need to provide their own implementation to call them).

@oddbookworm oddbookworm requested a review from a team as a code owner June 8, 2025 00:36
oddbookworm added a commit that referenced this pull request Jun 9, 2025
@gresm
Copy link
Contributor

gresm commented Jun 9, 2025

You could also do in base_test.c:

#include "base.c"

[...]

But that'll make building tests messy...

@oddbookworm
Copy link
Member Author

You could also do in base_test.c:

#include "base.c"

Absolutely not

That begs for linker problems that would be a pain to solve, and ultimately, having a header with all the declarations is just cleaner IMO. Including a source file is just plain nasty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants