LuaD
LuaD copied to clipboard
Struct conversions with private/internal members (fix #95)
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.
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.
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