outdated wrong comment in gtkobject.h?



In gtkobject.h I read the following:

/* The GtkObjectClass is the base of the Gtk+ objects classes hierarchy,
 * it ``inherits'' from the GtkTypeClass by mirroring its fields, which
 * must always be kept in sync completely. The GtkObjectClass defines
 * the basic necessities for the object inheritance mechanism to work.
 */
struct _GtkObjectClass
{
  GObjectClass parent_class;

  /* Non overridable class methods to set and get per class arguments */
  void (*set_arg) (GtkObject *object,
		   GtkArg    *arg,
		   guint      arg_id);
  void (*get_arg) (GtkObject *object,
		   GtkArg    *arg,
		   guint      arg_id);

  /* The function that will end an objects life time. In one way ore
   *  another all three of them are defined for all objects. If an
   *  object class overrides one of the methods in order to perform class
   *  specific destruction then it must still invoke its superclass'
   *  implementation of the method after it is finished with its
   *  own cleanup. (See the destroy function for GtkWidget for
   *  an example of how to do this).
   */
  void (*destroy)  (GtkObject *object);
};

The thing is that GtkTypeClass seems to be typedef'd to GTypeClass, which
seems to consist of a single GType, which in turn is something like a
nsigned integer.  So I don't see how it can be true that the fields are
being kept in sync.  Maybe this is an old comment and no longer correct?

Thanks for any explanation you can offer,

Britton Kerin
__
GNU GPL: "The Source will be with you... always."




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