This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Jim Kleck <jim.kleck@NetergyNet.COM> writes:> An alternative I have not seen discussed is to have "typedef void * blah"
> as the public interface (then the implementation would need to cast
> the object to the internal representation before operating on it).Then we lose the ability of the compiler to catch type errors.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/
Good point. I guess that leaves:
struct blah;
typedef struct blah *T_BLAH;
which preserves the type errors and simplifies the declaration of
objects of the desired type:
T_BLAH this_blah;
vs.
struct blah *this_blah;
JimK
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |