Re: minor fix for glib-genmarshal
- From: Johannes Stezenbach <js convergence de>
- To: Owen Taylor <otaylor redhat com>
- Cc: Ron Steinke <rsteinke w-link net>, gtk-devel-list gnome org, timj gtk org
- Subject: Re: minor fix for glib-genmarshal
- Date: Fri, 20 Jul 2001 16:28:33 +0200
Owen Taylor wrote:
>
> While this works, it strikes me as ugly -- to do a boolean test on an
> object of unknown type. (You could imagine v_return being a structure
> passed by value, though that won't happen currently.)
Hm, you're right.
On a related note, I quite frequently (e.g. in many finalize
handlers) use code like this:
if (foo)
{
g_object_unref (foo);
foo = NULL;
}
IMHO it yould be more elegant to code it like this:
g_object_unref_x (foo);
foo = NULL;
where g_object_unref_x (which lacks a good name ;-) would be just a
NULL pointer tolerant version of g_object_unref.
Using g_object_unref_x() in sig->rarg->release would also
solve this genmarshal problem.
Regards,
Johannes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]