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

Enums cause the tool to create invlaid C# code #251

Closed
Timo-Weike opened this issue Jul 12, 2021 · 1 comment
Closed

Enums cause the tool to create invlaid C# code #251

Timo-Weike opened this issue Jul 12, 2021 · 1 comment

Comments

@Timo-Weike
Copy link

Timo-Weike commented Jul 12, 2021

If I have the c types

typedef enum myEnum {
	One,
	Two
} enum_t;

typedef struct {
	enum_t enumField;
} Test1;

the tool generates C# code like

public enum myEnum
{
	One,
	Two,
}

public partial struct Test1
{
	[NativeTypeName("enum_t")]
	public enum myEnum enumField;
}

which is incorrect.

In contrast, if I drop the myEnum from the typedef the tool generates the correct C# code.

PS: It is the same for typedef struct name { ... } otherName;

@tannergooding
Copy link
Member

This was resolved with #256

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

No branches or pull requests

2 participants