i don't think you can do that without also at least declaring struct
ListType, such as:

    struct ListType;
    typedef struct ListType *ListPtr;

but yes, that's exactly what i was trying to point out.


-----Original Message-----
From: Dave Glowacki <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Friday, April 02, 1999 7:34 AM
Subject: Re: OS header files; const in prototypes, especially in
typedef'dpointers


>"Chris Antos" wrote:
>> >The only problem with _that_ is many of our types are intended to be
>> >opaque.  That is, you should not know the structure of a WindowType, and
we
>> >can't make the Win... routines take a "WindowType *" paramater without
>> >exposing WindowType.
>>
>> perhaps the original intent was for the objects to be opaque.
>> for that, the struct's should never have been in the publicly released
>> header files.
>> instead, the header file should have contained something like:
>>
>>     typedef ListPtr VoidPtr;
>>
>> this compiles and gives complete opacity.
>
>You can also do:
>
> typedef struct ListType *ListPtr;
>
>in the public header file without defining exactly what 'struct ListType'
>contains.  You can then fully define 'struct ListType' in either a private
>header file or in the body of your C program.
>
>

Reply via email to