Re: weak_pointer_location parameter to g_object_add_weak_pointer
- From: Darin Adler <darin bentspoon com>
- To: Owen Taylor <otaylor redhat com>
- Cc: Gtk Developers <gtk-devel-list gnome org>
- Subject: Re: weak_pointer_location parameter to g_object_add_weak_pointer
- Date: Thu, 07 Feb 2002 21:15:11 -0800
On 2/6/02 12:21 PM, "Owen Taylor" <otaylor redhat com> wrote:
> - Silently accepting a 'GObject *' will lead to people making the
> mistake of passing in the object rather than the location of the
> object, either inadvertently, or due to misunderstandings of how
> pointers work in C.
But if every caller has to put in a cast to (gpointer *), we still silently
accept a GObject * in otherwise-correct code. I don't think it's any less
likely to lead to errors if you always have a cast, rather than never having
a cast. In either case, you can pass a pointer of the wrong type in code
that's otherwise correct.
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]