LuaD icon indicating copy to clipboard operation
LuaD copied to clipboard

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

Open CromFr opened this issue 9 years ago • 2 comments
trafficstars

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.

CromFr avatar Feb 28 '16 23:02 CromFr

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.

JakobOvrum avatar Mar 06 '16 13:03 JakobOvrum

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

CromFr avatar Mar 06 '16 17:03 CromFr