Skip to content

Fixed sized buffers of typedefs to primitives seem to generate incorrectly #29

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

Open
waldnercharles opened this issue Mar 25, 2022 · 0 comments

Comments

@waldnercharles
Copy link
Contributor

A fixed size buffer of a typedef of a primitive generates improperly:

C

typedef uint64_t ecs_id_t;
typedef struct ecs_bulk_desc_t {
    ecs_id_t ids[32]; 
}

C#

public readonly partial struct ecs_id_t : IEquatable<ecs_id_t> { ... }
public unsafe partial struct ecs_bulk_desc_t
{
    public fixed IEquatable<ecs_id_t> ids[32];
}

The code path being hit that generates this is https://github.com/xoofx/CppAst.CodeGen/blob/master/src/CppAst.CodeGen/CSharp/Plugins/DefaultTypeConverter.cs#L177

Not sure what the correct way to resolve this is.

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

1 participant