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

Fix Issue 21217 - C++ header generator shouldn't emit private enums #11679

Merged
merged 1 commit into from
Sep 4, 2020

Conversation

wilzbach
Copy link
Member

@wilzbach wilzbach commented Sep 3, 2020

Required for #11640

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @wilzbach!

Bugzilla references

Auto-close Bugzilla Severity Description
21217 major C++ header generator shouldn't emit private enums

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#11679"

@MoonlightSentinel
Copy link
Contributor

MoonlightSentinel commented Sep 3, 2020

Not sure about protected enums, Why should they not be accessible across language barriers?

@wilzbach
Copy link
Member Author

wilzbach commented Sep 3, 2020

Not sure about protected enums, Why should they not be accessible across language barriers?

From the docs:

protected only applies inside classes (and templates as they can be mixed in) and means that a symbol can only be seen by members of the same module, or by a derived class. If accessing a protected instance member through a derived class member function, that member can only be accessed for the object instance which can be implicitly cast to the same type as ‘this’. protected module members are illegal. (https://dlang.org/spec/attribute.html#visibility_attributes)

My reasoning:

So I would feel more comfortable emitting protected enums if protected variables were a thing in dtoh, but AFAICT everything emitted is public.

@MoonlightSentinel
Copy link
Contributor

MoonlightSentinel commented Sep 3, 2020

So I would feel more comfortable emitting protected enums if protected variables were a thing in dtoh, but AFAICT everything emitted is public.

Fair enough, this shouldn't be a real breaking change given the state of the header generator. But it needs to be re-enabled once the generator properly emits protection levels.

@Geod24 Geod24 merged commit 2da5ecb into dlang:master Sep 4, 2020
@ibuclaw ibuclaw added the Feature:dtoh C++ header generation label Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants