Skip to content

Feature Request: Better naming for anon structs that are only used via typedefs #187

@zwergziege

Description

@zwergziege

It would be nice if ctypesgen could detect if (anon) structs are only used via a typedef and replace the struct name with its typedef.
Example:

typedef struct {
  uint x;
} SomeName;

Currently, this code generates a class with the not very descriptive name anon_struct_x and the assignment SomeName = anon_struct_x. This way, we can use SomeName as expected, but in error messages we will get anon_struct_x which is a bit annoying.
It's probably not to hard to achieve, since ctypesgen already checks dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions