Re: Outstanding patches, #58609



----- Original Message -----
From: "Owen Taylor" <otaylor redhat com>
To: "Matthias Clasen" <matthiasc poet de>
Cc: <gtk-devel-list gnome org>
Sent: Wednesday, August 08, 2001 6:59 PM
Subject: Re: Outstanding patches, #58609


[...]

> > +  class = g_type_class_peek (type);
>
> why don't you add a g_assert (class != NULL); here. We know it
> will be loaded here because we have an object of a
> derived type, but in general, you shouldn't assume
> that g_type_class_peek() will return the class.

Looking at other uses of g_type_class_peek in that file, I decided to go
with

class = G_OBJECT_CLASS (g_type_class_peek (type));

Matthias





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