Re: Padding vfunc tables for less abi breakeage.



On Fri, 2005-01-07 at 06:36 -0500, Carl Nygard wrote:
[snip]
>  If you pad out the vtable with dummy
> signal handlers, and you have to add a new signal handler, don't you
> also typically add a sigc::signal for it as well?

That's a reasonable guess, but actually gtkmm signals that wrap GTK+
signals don't use sigc::signal, and have accessors that look like this:

Glib::SignalProxy0<void> Button::signal_clicked()
{
  return Glib::SignalProxy0<void>(this, &Button_signal_clicked_info);
}

so each call of the accessor creates a new proxy object, instead of
returning a member variable.

I think we do that partly for efficiency-of-object-size reasons.

>   And I'd guess the
> sigc::signal size would be more likely to vary depending on the argument
> list or template parameter list, but I don't know the answer to that
> either.  But if so, then that would be quite impossible to predict for
> choosing padding sigc::signals.

We are lucky that we don't have that problem.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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