From: Godmar Back (gback@cs.utah.edu)
Date: Wed Jan 27 1999 - 12:33:36 EST
>
> On Jan 27, 1999, Godmar Back <gback@cs.utah.edu> wrote:
>
> > Think about it some more. collector.ops is nothing but an explicit
> > pointer to the vtable.
>
> > typedef struct _Collector {
> > struct GarbageCollectorInterface_Ops *ops;
> > } Collector;
>
> > and
>
> > struct _CollectorImpl {
> > Collector collector;
> > }
>
> But why can't I define
>
> struct _CollectorImpl {
> GarbageCollectorInterface_Ops *vtable;
> };
>
You could. It makes no difference. The number of indirections
is the same. There's many ways to express this in C.
- Godmar
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:51 EDT