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

Struct conversions with private/internal members (fix #95) #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

CromFr
Copy link

@CromFr CromFr commented Feb 28, 2016

Related with #95

These commits makes LuaD ignore non public members, as well as members annotated with the @internal UDA.

struct LuaData{
  int a; //converted
  private int b; //skipped
  protected int c; //skipped
  @internal public int d; //skipped
  public int __e; //skipped using existing rules
}

Currently, the only way to ignore members is to prepend their names with a double underscore.
If an inaccesible member (private or package) is not ignored, the compilation will fail with LuaD trying to access the member.

@JakobOvrum
Copy link
Owner

The @internal attribute seems like a bit of a rider. If it's meant to be used by library users, it should be documented, and a rationale provided for its inclusion.

It's not that big of a deal if you don't have time to deal with this, but some feedback before I merge would be appreciated.

@CromFr
Copy link
Author

CromFr commented Mar 6, 2016

I can update/add some documentation if you think @internal is a good solution.

I can also remove the @internal UDA and keep the public visibility restriction, which will also fix #95

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.

2 participants