Re: Property bag / Evolution breakage
- From: Martin Baulig <martin home-of-linux org>
- To: Federico Mena Quintero <federico helixcode com>
- Cc: gnome-components-list gnome org, Michael Meeks <mmeeks gnu org>
- Subject: Re: Property bag / Evolution breakage
- Date: 26 Oct 2000 19:49:30 +0200
Federico Mena Quintero <federico helixcode com> writes:
> --- bonobo-property-bag.c 2000/10/17 16:58:46 1.24
> +++ bonobo-property-bag.c 2000/10/25 03:49:33 1.25
> @@ -963,7 +963,7 @@
> prop = g_hash_table_lookup (pb->priv->props, name);
>
> g_return_if_fail (prop != NULL);
> - g_return_if_fail (prop->type != new_value->_type);
> + g_return_if_fail (prop->type == new_value->_type);
>
> notify_listeners (pb, prop, new_value, ev);
> }
> @@ -984,7 +984,7 @@
>
> g_return_if_fail (prop != NULL);
> g_return_if_fail (prop->set_prop != NULL);
> - g_return_if_fail (prop->type != value->_type);
> + g_return_if_fail (prop->type == value->_type);
>
> prop->set_prop (pb, value, prop->idx, prop->user_data);
>
> that seems to break all of Evolution's components because their URIs
> are set via property bags. I don't know if the old code worked purely
> by chance: in the context of property bags, can you compare typecodes
> purely by pointers to them?
Hi,
well, the old code was exactly 100.0% wrong and it also broke all simple
types and some user-defined types such as enums.
Actually, I found this bug when I was working on the new EOG component
and when I wanted to fix it I realized that Mike Kester (or someone else?)
already fixed it.
However, his fix is still wrong, but only about 98.5% and not 100.0%.
The correct thing to do here is to use CORBA::TypeCode::equivalent (or
even CORBA::TypeCode::equal) since you really cannot compare typecodes
by pointers to them.
Oh, I forgot that ORBit is a CORBA 2.2 ORB and not a 2.3 one. Well, in
this case we'd need to use CORBA::TypeCode::equal.
I'll make a patch after dinner.
--
Martin Baulig
martin gnome org (private)
baulig suse de (work)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]