We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following C-code
typedef enum {false=0, true=1} boolean;
produces following Java-Code:
... /// enum values public enum boolean implements IntValuedEnum<boolean > { false(0), true(1); boolean(long value) { this.value = value; } public final long value; public long value() { return this.value; } public Iterator<boolean > iterator() { return Collections.singleton(this).iterator(); } public static IntValuedEnum<boolean > fromValue(int value) { return FlagSet.fromValue(value, values()); } }; ...
Two problems here:
Instead, jnaerator should generate safe-names like below:
... /// enum values public enum JNAErator_boolean_ implements IntValuedEnum<JNAErator_boolean_ > { JNAErator_false(0), JNAErator_true(1); JNAErator_boolean_(long value) { this.value = value; } public final long value; public long value() { return this.value; } public Iterator<JNAErator_boolean_ > iterator() { return Collections.singleton(this).iterator(); } public static IntValuedEnum<JNAErator_boolean_ > fromValue(int value) { return FlagSet.fromValue(value, values()); } }; ...
The text was updated successfully, but these errors were encountered:
Hi @siamak-haschemi ,
Thanks a lot for your report!
This is really bad, will fix asap :-)
Cheers
Sorry, something went wrong.
JNAerator: handle enum names that collide with Java identifiers (issue …
f329525
…#334)
Thanks for your patience, this is now fixed (a new snapshot is being uploaded as I write, should be available within an hour).
No branches or pull requests
The following C-code
produces following Java-Code:
Two problems here:
Instead, jnaerator should generate safe-names like below:
The text was updated successfully, but these errors were encountered: