Re: taking struct _GIOChannel private



Ron Steinke <rsteinke w-link net> writes:

> From: Havoc Pennington <hp redhat com>
> >
> > Owen Taylor <otaylor redhat com> writes: 
> > > Well, before we do that, we need to decide if public implementations 
> > > of GIOChannel are allowed or not.
> > > 
> > > (That is, can I create a new type of GIOChannel in code outside
> > > of GLib?)
> > > 
> > > If they are, then we need to leave the GIOChannel structure public for
> > > the structure size. 
> > > 
> >
> > A possible reason for this is to create a gnome-vfs GIOChannel to
> > re-use the UTF-8 conversion code with vfs URIs.
> 
> Should I just declare all the GIOChannel fields /*< private >*/,
> and not worry about hiding the structure?

I'm not actually sure if creating new types of GIOChannel is going
to be that useful, but I'm not sure that it isn't. The problem
with making GIOChannel public now is that it prevents us from
adding fields to the structure later.

Why don't we go with the /*< private *>/ approach, and also add
an "escape hatch" iochannel->private pointer that is unused
for now, but if we need to add stuff to GIOChannel if we
later need to add additional fields to the structure.

Regards,
                                        Owen




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]