• Emmanuele Bassi's avatar
    Split disguised attribute into two · 8d44bd13
    Emmanuele Bassi authored and Emmanuele Bassi's avatar Emmanuele Bassi committed
    The disguised attribute started off as a way to indicate a typedef to a
    structure pointer, e.g.
        typedef struct Foo* FooPtr;
    Over the years, though, it started to include opaque structure types,
        typedef struct _FooObject FooObject;
        typedef struct _FooObjectClass FooObjectClass;
    This has led to issues in language bindings, code generators, and
    documentation generators, which now have issues when dealing with both
    pointer aliases and opaque types.
    An initial attempt at fixing this mess in commit f606183a ended up
    breaking Vala, and had to be reverted.
    To avoid breaking existing users we can follow a similar approach to the
    allow-none/nullable/optional solution:
    1. introduce a new pair of attributes: "pointer" and "opaque"
    2. deprecate the "disguised" attribute
    The "pointer" attribute covers the case of pointer types.
    The "opaque" attribute covers the case of opaque structured types.
    See also: vala#735