Skip to content

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

Open
@waldnercharles

Description

@waldnercharles

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions