Register group proposal
Jim Kleck
jim.kleck@NetergyNet.COM
Tue Feb 27 13:44:00 GMT 2001
Per Bothner wrote:
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
ÃÂ
More information about the Gdb
mailing list