Skip to content

You can't have opaque struct pointers in the @interface, if the @implementation knows the struct #19

Description

@mulle-nat
struct opaque_struct;

@interface Foo
{
   struct opaque_struct  *p;  // will signature to ^{opaque_struct=}
}
@end


@implementation Foo

+ (Class) class
{
   return( self);
}

@end


// no longer opaque
struct opaque_struct
{
   int  foo;
};


@interface Bar
{
   struct opaque_struct  *p;  // will signature to ^{opaque_struct=i}
}
@end


@implementation Bar

+ (Class) class
{
   return( self);
}

@end

Thoughts

  • this is fine (?)
  • use a category to separate non-opaque knowledge
  • the @encode for pointers should be opaque in all cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions