Dude :-(
- From: Martin Baulig <martin home-of-linux org>
- To: gnome-components-list gnome org
- Subject: Dude :-(
- Date: 08 Aug 2001 02:55:10 +0200
Hi guys,
next time I'm on a masochist trip I'll probably fight against some Cactus ...
I already said a couple of times that I don't like the idea of doing larger
changes to any module and then immediately freezing.
So now we're in the situation that I have a source and binary incompatible
chane in libbonobo - and it *must* go in, unless we want to live with a
totally unusable Bonobo:PropertyBag, of course ....
Today was yet another of these very frustrating moments where I spend hours
to debug my code to find out what was going wrong - first I suspected that
there was a bug in my guile bindings, after writing a small C test program
I quickly realized that this wasn't the case so I went on debugging my
component.
After hacking and debugging a lot in my guile bindings, I finally reached the
point where there was a
BONOBO_ARG_SET_STRING (arg, text);
in my component's PropertyBag's get_prop() function, with text == "San Francisco",
but what "arrived" in my container was an empty string ("") - so I looked at
ORBit2's marshalling code, without any luck.
After three Koelsch and two films in TV I returned and then I found:
=====
void
bonobo_closure_invoke_va_list (GClosure *closure,
GValue *retval,
GType first_type,
va_list var_args)
{
GArray *params;
GType type;
int i;
g_return_if_fail (closure != NULL);
params = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 6);
for (type = first_type; type; type = va_arg (var_args, GType)) {
GValue value;
gchar *error;
value.g_type = 0;
g_value_init (&value, type);
G_VALUE_COLLECT (&value, var_args, 0, &error);
if (error) {
g_warning ("%s: %s", G_STRLOC, error);
g_free (error);
break;
}
g_array_append_val (params, value);
}
g_closure_invoke (closure,
retval,
params->len,
(GValue *)params->data,
NULL);
for (i = 0; i < params->len; i++)
g_value_unset (&g_array_index (params, GValue, i));
}
======
which is used on a function which looks like this:
======
typedef void (*BonoboPropertyGetFn) (BonoboPropertyBag *bag,
BonoboArg *arg,
guint arg_id,
CORBA_Environment *ev,
gpointer user_data);
======
Since this is not the first problem with broken marshallers in Cactus's
closure code - let's make this like in a quiz show: what's broken with
this code ?
Answer + patch follows tomorrow .....
--
Martin Baulig
martin gnome org (private)
baulig suse de (work)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]