The big closure / types patch.



Hi guys,

here is this big closure/types patch which is sitting in my local tree
for quite some time and which I'm going to commit tomorrow morning:

=====
2001-09-04  Martin Baulig  <baulig suse de>

	This big closures / types patch:

	- GValues are not copied anymore in signal/closure marshallers
	(using G_SIGNAL_TYPE_STATIC_SCOPE / G_VALUE_NOCOPY_CONTENTS).

	- we use "real" types (not G_TYPE_POINTER) in all signal/closure
	marshallers.

	- some closures now have custom marshallers to make them easier
	to use for scripting languages.

	- bonobo_closure_invoke() no longer returns a GValue, it now takes
	the return type as first type argument, see the documentation in
	bonobo-types.c for details.

	Detailed list of changes:

	* bonobo/bonobo-types.h (BONOBO_TYPE_STRING,
	BONOBO_TYPE_CORBA_ANY, BONOBO_TYPE_CORBA_OBJECT,
        BONOBO_TYPE_CORBA_TYPECODE, BONOBO_TYPE_CORBA_EXCEPTION):
	Set the G_SIGNAL_TYPE_STATIC_SCOPE flag for all these types.
	(BONOBO_TYPE_STRING): New type.
	(BONOBO_TYPE_NONSTATIC_UNKNOWN, BONOBO_TYPE_NONSTATIC_CORBA_ANY,
        BONOBO_TYPE_NONSTATIC_CORBA_OBJECT, BONOBO_TYPE_NONSTATIC_CORBA_TYPECODE,
	BONOBO_TYPE_NONSTATIC_CORBA_EXCEPTION): Added #defines for the
	non-static versions of these types.

	* bonobo/bonobo-types.c (bonobo_value_set_unknown,
        bonobo_value_set_corba_any, bonobo_value_set_corba_typecode,
	bonobo_value_set_corba_environment): New functions; they do not
	copy their arguments and set the G_VALUE_NOCOPY_CONTENTS flag.
	(bonobo_closure_invoke_valist): Removed the `GValue *retval'
	argument, renamed `first_type' to `return_type'. The return value
	is now handled like a normal argument. For details, see the
	documentation in the source file.
	(bonobo_closure_invoke): Removed the `GValue *retval' argument,
	renamed `first_type' to `return_type'

	* bonobo/bonobo-generic-factory.c: Marshal the closure as
	OBJECT:STRING, not as POINTER:STRING.

	* bonobo/bonobo-item-container.c: Marshal the "get_object" signal
	as BOXED:STRING_BOOLEAN_BOXED (retval as BONOBO_TYPE_UNKNOWN, args
	are BONOBO_TYPE_STRING, G_TYPE_BOOLEAN, BONOBO_TYPE_CORBA_EXCEPTION);

	* bonobo/bonobo-item-handler.c: Provide custom marshallers for the
	`enum_objects' and `get_object' closures:
	- `enum_objects' returns a G_TYPE_POINTER and takes a
	BONOBO_ITEM_HANDLER_TYPE and a BONOBO_TYPE_CORBA_EXCEPTION.
	- `get_object' returns a BONOBO_TYPE_UNKNOWN and takes
	BONOBO_ITEM_HANDLER_TYPE, G_TYPE_STRING, G_TYPE_BOOLEAN and
	BONOBO_TYPE_CORBA_EXCEPTION arguments.

	* bonobo/bonobo-listener.c: Marshal the `event_callback' as
	VOID:STRING,BOXED,BOXED (BONOBO_TYPE_STRING, BONOBO_TYPE_CORBA_ANY,
	and BONOBO_TYPE_CORBA_EXCEPTION).

	* bonobo/bonobo-marshal.list: Removed all unused items and everything
	from libbonoboui.

	* bonobo/bonobo-moniker-simple.h (BONOBO_RESOLVE_FLAG_TYPE):
	New type; this is a GFlags type for Bonobo_ResolveFlag.
	(bonobo_resolve_flag_get_type): Added type init func for it.

	* bonobo/bonobo-moniker-simple.c: Provide a custom marshaller for
	the `resolve_fn' closure. Instead passing a Bonobo_ResolveOptions as
	G_TYPE_POINTER, the closure now takes its contents as two arguments:
	BONOBO_RESOLVE_FLAG_TYPE and G_TYPE_LONG.
	The closure returns a BONOBO_TYPE_CORBA_OBJECT and takes
	BONOBO_MONIKER_TYPE, BONOBO_RESOLVE_FLAG_TYPE, G_TYPE_LONG,
	BONOBO_TYPE_STRING, BONOBO_TYPE_CORBA_EXCEPTION as arguments.

	* bonobo/bonobo-object.c: Marshal the "system_exception" signal
	VOID:OBJECT,BOXED (BONOBO_OBJECT_TYPE | G_SIGNAL_TYPE_STATIC_SCOPE
	and BONOBO_TYPE_CORBA_EXCEPTION).

	* bonobo/bonobo-property-bag.c: Provide custom marshallers for the
	'get_prop' and `set_prop' closures:
	`get_prop' returns BONOBO_TYPE_CORBA_ANY and takes
	BONOBO_PROPERTY_BAG_TYPE,BONOBO_TYPE_CORBA_TYPECODE,
	G_TYPE_UINT, BONOBO_TYPE_CORBA_EXCEPTION.
	`set_prop' returns nothing and takes
	BONOBO_PROPERTY_BAG_TYPE, BONOBO_TYPE_CORBA_ANY, G_TYPE_UINT,
	BONOBO_TYPE_CORBA_EXCEPTION.

====

? ior
? monikers/Bonobo_Moniker_std.oaf
? monikers/Bonobo_Moniker_std.oaf.in
? samples/echo/Bonobo_Sample_Echo.oaf
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/libbonobo/ChangeLog,v
retrieving revision 1.170
diff -u -u -p -b -B -r1.170 ChangeLog
--- ChangeLog	2001/09/04 20:21:41	1.170
+++ ChangeLog	2001/09/04 21:01:19
@@ -1,3 +1,90 @@
+2001-09-04  Martin Baulig  <baulig suse de>
+
+	This big closures / types patch:
+
+	- GValues are not copied anymore in signal/closure marshallers
+	(using G_SIGNAL_TYPE_STATIC_SCOPE / G_VALUE_NOCOPY_CONTENTS).
+
+	- we use "real" types (not G_TYPE_POINTER) in all signal/closure
+	marshallers.
+
+	- some closures now have custom marshallers to make them easier
+	to use for scripting languages.
+
+	- bonobo_closure_invoke() no longer returns a GValue, it now takes
+	the return type as first type argument, see the documentation in
+	bonobo-types.c for details.
+
+	Detailed list of changes:
+
+	* bonobo/bonobo-types.h (BONOBO_TYPE_STRING,
+	BONOBO_TYPE_CORBA_ANY, BONOBO_TYPE_CORBA_OBJECT,
+        BONOBO_TYPE_CORBA_TYPECODE, BONOBO_TYPE_CORBA_EXCEPTION):
+	Set the G_SIGNAL_TYPE_STATIC_SCOPE flag for all these types.
+	(BONOBO_TYPE_STRING): New type.
+	(BONOBO_TYPE_NONSTATIC_UNKNOWN, BONOBO_TYPE_NONSTATIC_CORBA_ANY,
+        BONOBO_TYPE_NONSTATIC_CORBA_OBJECT, BONOBO_TYPE_NONSTATIC_CORBA_TYPECODE,
+	BONOBO_TYPE_NONSTATIC_CORBA_EXCEPTION): Added #defines for the
+	non-static versions of these types.
+
+	* bonobo/bonobo-types.c (bonobo_value_set_unknown,
+        bonobo_value_set_corba_any, bonobo_value_set_corba_typecode,
+	bonobo_value_set_corba_environment): New functions; they do not
+	copy their arguments and set the G_VALUE_NOCOPY_CONTENTS flag.
+	(bonobo_closure_invoke_valist): Removed the `GValue *retval'
+	argument, renamed `first_type' to `return_type'. The return value
+	is now handled like a normal argument. For details, see the
+	documentation in the source file.
+	(bonobo_closure_invoke): Removed the `GValue *retval' argument,
+	renamed `first_type' to `return_type'
+
+	* bonobo/bonobo-generic-factory.c: Marshal the closure as
+	OBJECT:STRING, not as POINTER:STRING.
+
+	* bonobo/bonobo-item-container.c: Marshal the "get_object" signal
+	as BOXED:STRING_BOOLEAN_BOXED (retval as BONOBO_TYPE_UNKNOWN, args
+	are BONOBO_TYPE_STRING, G_TYPE_BOOLEAN, BONOBO_TYPE_CORBA_EXCEPTION);
+
+	* bonobo/bonobo-item-handler.c: Provide custom marshallers for the
+	`enum_objects' and `get_object' closures:
+	- `enum_objects' returns a G_TYPE_POINTER and takes a
+	BONOBO_ITEM_HANDLER_TYPE and a BONOBO_TYPE_CORBA_EXCEPTION.
+	- `get_object' returns a BONOBO_TYPE_UNKNOWN and takes
+	BONOBO_ITEM_HANDLER_TYPE, G_TYPE_STRING, G_TYPE_BOOLEAN and
+	BONOBO_TYPE_CORBA_EXCEPTION arguments.
+
+	* bonobo/bonobo-listener.c: Marshal the `event_callback' as
+	VOID:STRING,BOXED,BOXED (BONOBO_TYPE_STRING, BONOBO_TYPE_CORBA_ANY,
+	and BONOBO_TYPE_CORBA_EXCEPTION).
+
+	* bonobo/bonobo-marshal.list: Removed all unused items and everything
+	from libbonoboui.
+
+	* bonobo/bonobo-moniker-simple.h (BONOBO_RESOLVE_FLAG_TYPE):
+	New type; this is a GFlags type for Bonobo_ResolveFlag.
+	(bonobo_resolve_flag_get_type): Added type init func for it.
+
+	* bonobo/bonobo-moniker-simple.c: Provide a custom marshaller for
+	the `resolve_fn' closure. Instead passing a Bonobo_ResolveOptions as
+	G_TYPE_POINTER, the closure now takes its contents as two arguments:
+	BONOBO_RESOLVE_FLAG_TYPE and G_TYPE_LONG.
+	The closure returns a BONOBO_TYPE_CORBA_OBJECT and takes
+	BONOBO_MONIKER_TYPE, BONOBO_RESOLVE_FLAG_TYPE, G_TYPE_LONG,
+	BONOBO_TYPE_STRING, BONOBO_TYPE_CORBA_EXCEPTION as arguments.
+
+	* bonobo/bonobo-object.c: Marshal the "system_exception" signal
+	VOID:OBJECT,BOXED (BONOBO_OBJECT_TYPE | G_SIGNAL_TYPE_STATIC_SCOPE
+	and BONOBO_TYPE_CORBA_EXCEPTION).
+
+	* bonobo/bonobo-property-bag.c: Provide custom marshallers for the
+	'get_prop' and `set_prop' closures:
+	`get_prop' returns BONOBO_TYPE_CORBA_ANY and takes
+	BONOBO_PROPERTY_BAG_TYPE,BONOBO_TYPE_CORBA_TYPECODE,
+	G_TYPE_UINT, BONOBO_TYPE_CORBA_EXCEPTION.
+	`set_prop' returns nothing and takes
+	BONOBO_PROPERTY_BAG_TYPE, BONOBO_TYPE_CORBA_ANY, G_TYPE_UINT,
+	BONOBO_TYPE_CORBA_EXCEPTION.
+
 2001-08-31  Abel Cheung  <maddog linux org hk>
 
 	* configure.in (ALL_LINGUAS): zh_TW.Big5 -> zh_TW
Index: bonobo/bonobo-generic-factory.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-generic-factory.c,v
retrieving revision 1.39
diff -u -u -p -b -B -r1.39 bonobo-generic-factory.c
--- bonobo/bonobo-generic-factory.c	2001/08/01 23:02:04	1.39
+++ bonobo/bonobo-generic-factory.c	2001/09/04 21:01:19
@@ -83,7 +83,7 @@ bonobo_generic_factory_construct (Bonobo
 	g_return_val_if_fail (BONOBO_IS_GENERIC_FACTORY (factory), NULL);
 	
 	factory->priv->factory_closure =
-		bonobo_closure_store (factory_closure, bonobo_marshal_POINTER__STRING);
+		bonobo_closure_store (factory_closure, bonobo_marshal_OBJECT__STRING);
 	factory->priv->oaf_iid    = g_strdup (oaf_iid);
 	
 	ret = bonobo_activation_active_server_register (oaf_iid, BONOBO_OBJREF (factory));
@@ -178,20 +178,14 @@ bonobo_generic_factory_new_generic (Bono
 				    const char           *oaf_iid)
 {
 	BonoboObject *ret;
-	GValue        ret_val = {0, };
 	
 	g_return_val_if_fail (factory != NULL, NULL);
 	g_return_val_if_fail (BONOBO_IS_GENERIC_FACTORY (factory), NULL);
 
-	g_value_init (&ret_val, G_TYPE_POINTER);
-	
 	bonobo_closure_invoke (factory->priv->factory_closure,
-			       &ret_val,
+			       BONOBO_OBJECT_TYPE, &ret,
 			       BONOBO_GENERIC_FACTORY_TYPE, factory,
-			       G_TYPE_STRING, oaf_iid, 0);
-
-	ret = g_value_peek_pointer (&ret_val);
-	g_value_unset (&ret_val);
+			       BONOBO_TYPE_STRING, oaf_iid, 0);
 
 	return ret;
 }
Index: bonobo/bonobo-item-container.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-item-container.c,v
retrieving revision 1.56
diff -u -u -p -b -B -r1.56 bonobo-item-container.c
--- bonobo/bonobo-item-container.c	2001/07/02 12:50:29	1.56
+++ bonobo/bonobo-item-container.c	2001/09/04 21:01:20
@@ -23,6 +23,7 @@
 #include <bonobo/bonobo-object.h>
 #include <bonobo/bonobo-item-container.h>
 #include <bonobo/bonobo-marshal.h>
+#include <bonobo/bonobo-types.h>
 
 enum {
 	GET_OBJECT,
@@ -133,13 +134,6 @@ impl_Bonobo_ItemContainer_getObjectByNam
 	return ret;
 }
 
-typedef Bonobo_Unknown (*GnomeSignal_POINTER__POINTER_BOOL_POINTER) (
-	BonoboItemContainer *item_container,
-	CORBA_char *item_name,
-	CORBA_boolean only_if_exists,
-	CORBA_Environment *ev,
-	gpointer func_data);
-
 /* BonoboItemContainer class initialization routine  */
 static void
 bonobo_item_container_class_init (BonoboItemContainerClass *klass)
@@ -157,10 +151,12 @@ bonobo_item_container_class_init (Bonobo
 			       G_SIGNAL_RUN_LAST,
 			       0,
 			       NULL, NULL,
-			       bonobo_marshal_POINTER__POINTER_BOOLEAN_POINTER,
-			       G_TYPE_POINTER,
+			       bonobo_marshal_BOXED__STRING_BOOLEAN_BOXED,
+			       BONOBO_TYPE_UNKNOWN,
 			       3,
-			       G_TYPE_POINTER, G_TYPE_BOOLEAN, G_TYPE_POINTER);
+			       BONOBO_TYPE_STRING,
+			       G_TYPE_BOOLEAN,
+			       BONOBO_TYPE_CORBA_EXCEPTION);
 
 	epv->enumObjects     = impl_Bonobo_ItemContainer_enumObjects;
 	epv->getObjectByName = impl_Bonobo_ItemContainer_getObjectByName;
Index: bonobo/bonobo-item-handler.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-item-handler.c,v
retrieving revision 1.15
diff -u -u -p -b -B -r1.15 bonobo-item-handler.c
--- bonobo/bonobo-item-handler.c	2001/08/07 21:09:43	1.15
+++ bonobo/bonobo-item-handler.c	2001/09/04 21:01:20
@@ -28,6 +28,84 @@ struct _BonoboItemHandlerPrivate
 	GClosure *get_object;
 };
 
+static void
+bonobo_marshal_POINTER__DUMMY_BOXED (GClosure     *closure,
+				     GValue       *return_value,
+				     guint         n_param_values,
+				     const GValue *param_values,
+				     gpointer      invocation_hint,
+				     gpointer      marshal_data)
+{
+	typedef gpointer (*GMarshalFunc_POINTER__POINTER_BOXED) (gpointer     data1,
+								 gpointer     arg_1,
+								 gpointer     arg_2,
+								 gpointer     data2);
+	register GMarshalFunc_POINTER__POINTER_BOXED callback;
+	register GCClosure *cc = (GCClosure*) closure;
+	register gpointer data1, data2;
+	gpointer v_return;
+
+	g_return_if_fail (return_value != NULL);
+	g_return_if_fail (n_param_values == 2);
+
+	if (G_CCLOSURE_SWAP_DATA (closure)) {
+		data1 = closure->data;
+		data2 = g_value_peek_pointer (param_values + 0);
+	} else {
+		data1 = g_value_peek_pointer (param_values + 0);
+		data2 = closure->data;
+	}
+	callback = (GMarshalFunc_POINTER__POINTER_BOXED) (marshal_data ? marshal_data : cc->callback);
+
+	v_return = callback (data1,
+			     NULL,
+			     g_value_get_boxed (param_values + 1),
+			     data2);
+
+	g_value_set_pointer (return_value, v_return);
+}
+
+static void
+bonobo_marshal_BOXED__STRING_BOOLEAN_DUMMY_BOXED (GClosure     *closure,
+						  GValue       *return_value,
+						  guint         n_param_values,
+						  const GValue *param_values,
+						  gpointer      invocation_hint,
+						  gpointer      marshal_data)
+{
+	typedef gpointer (*GMarshalFunc_BOXED__STRING_BOOLEAN_POINTER_BOXED) (gpointer     data1,
+									      gpointer     arg_1,
+									      gboolean     arg_2,
+									      gpointer     arg_3,
+									      gpointer     arg_4,
+									      gpointer     data2);
+	register GMarshalFunc_BOXED__STRING_BOOLEAN_POINTER_BOXED callback;
+	register GCClosure *cc = (GCClosure*) closure;
+	register gpointer data1, data2;
+	gpointer v_return;
+
+	g_return_if_fail (return_value != NULL);
+	g_return_if_fail (n_param_values == 4);
+
+	if (G_CCLOSURE_SWAP_DATA (closure)) {
+		data1 = closure->data;
+		data2 = g_value_peek_pointer (param_values + 0);
+	} else {
+		data1 = g_value_peek_pointer (param_values + 0);
+		data2 = closure->data;
+	}
+	callback = (GMarshalFunc_BOXED__STRING_BOOLEAN_POINTER_BOXED) (marshal_data ? marshal_data : cc->callback);
+
+	v_return = callback (data1,
+			     (char*) g_value_get_string (param_values + 1),
+			     g_value_get_boolean (param_values + 2),
+			     NULL,
+			     g_value_get_boxed (param_values + 3),
+			     data2);
+
+	g_value_set_boxed_take_ownership (return_value, v_return);
+}
+
 /*
  * Returns a list of the objects in this container
  */
@@ -40,17 +118,13 @@ impl_enum_objects (PortableServer_Servan
 	if (handler->priv->enum_objects)
 	{
 		Bonobo_ItemContainer_ObjectNames *ret;
-		GValue ret_val = {0, };
 
-		g_value_init (&ret_val, G_TYPE_POINTER);
-		
 		bonobo_closure_invoke (handler->priv->enum_objects,
-				       &ret_val,
+				       G_TYPE_POINTER,              &ret,
 				       BONOBO_ITEM_HANDLER_TYPE, handler,
-				       G_TYPE_POINTER,           ev, 0);
-
-		ret = g_value_get_pointer (&ret_val);
-		g_value_unset (&ret_val);
+				       G_TYPE_POINTER,              NULL,
+				       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+				       0);
 
 		return ret;
 	} else
@@ -69,20 +143,14 @@ impl_get_object (PortableServer_Servant 
 	if (handler->priv->get_object)
 	{
 		Bonobo_Unknown ret;
-		GValue ret_val = {0, };
 
-		g_value_init (&ret_val, G_TYPE_BOXED);
-		
-		bonobo_closure_invoke (handler->priv->enum_objects,
-				       &ret_val,
+		bonobo_closure_invoke (handler->priv->get_object,
+				       BONOBO_TYPE_UNKNOWN,         &ret,
 				       BONOBO_ITEM_HANDLER_TYPE, handler,
 				       G_TYPE_STRING,            item_name,
 				       G_TYPE_BOOLEAN,           only_if_exists,
-				       G_TYPE_POINTER,           ev, 0);
-				       
-				       
-		ret = g_value_get_boxed (&ret_val);
-		g_value_unset (&ret_val);
+				       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+				       0);
 
 		return ret;
 	} else
@@ -155,9 +223,9 @@ bonobo_item_handler_construct (BonoboIte
 	g_return_val_if_fail (BONOBO_IS_ITEM_HANDLER (handler), NULL);
 	
 	handler->priv->enum_objects = bonobo_closure_store
-		(enum_objects, bonobo_marshal_POINTER__POINTER_POINTER);
+		(enum_objects, bonobo_marshal_POINTER__DUMMY_BOXED);
 	handler->priv->get_object   = bonobo_closure_store
-		(get_object, bonobo_marshal_BOXED__STRING_BOOLEAN_POINTER_POINTER);
+		(get_object, bonobo_marshal_BOXED__STRING_BOOLEAN_DUMMY_BOXED);
 	
 	return handler;
 }
Index: bonobo/bonobo-listener.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-listener.c,v
retrieving revision 1.25
diff -u -u -p -b -B -r1.25 bonobo-listener.c
--- bonobo/bonobo-listener.c	2001/08/07 21:09:43	1.25
+++ bonobo/bonobo-listener.c	2001/09/04 21:01:20
@@ -47,11 +47,12 @@ impl_Bonobo_Listener_event (PortableServ
 
 	if (listener->priv->event_callback)
 		bonobo_closure_invoke (listener->priv->event_callback,
-				       NULL,
+				       G_TYPE_NONE,
 				       BONOBO_LISTENER_TYPE, listener,
-				       G_TYPE_STRING, event_name,
+				       BONOBO_TYPE_STRING, event_name,
 				       BONOBO_TYPE_CORBA_ANY, args,
-				       G_TYPE_POINTER, ev, 0);
+				       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+				       0);
 		
 	g_signal_emit (G_OBJECT (listener),
 		       signals [EVENT_NOTIFY], 0,
@@ -91,9 +92,11 @@ bonobo_listener_class_init (BonoboListen
 		"event_notify", G_TYPE_FROM_CLASS (oclass), G_SIGNAL_RUN_LAST,
 		G_STRUCT_OFFSET (BonoboListenerClass, event_notify),
 		NULL, NULL,
-		bonobo_marshal_VOID__POINTER_POINTER_POINTER,
+		bonobo_marshal_VOID__STRING_BOXED_BOXED,
 		G_TYPE_NONE, 3,
-		G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER);
+		BONOBO_TYPE_STRING,
+		BONOBO_TYPE_CORBA_ANY,
+		BONOBO_TYPE_CORBA_EXCEPTION);
 
 	epv->event = impl_Bonobo_Listener_event;
 }
@@ -144,7 +147,7 @@ bonobo_listener_new_closure (GClosure *e
 	listener = g_object_new (BONOBO_LISTENER_TYPE, NULL);
 
 	listener->priv->event_callback = bonobo_closure_store (
-		event_closure, bonobo_marshal_VOID__STRING_BOXED_POINTER);
+		event_closure, bonobo_marshal_VOID__STRING_BOXED_BOXED);
 
 	return listener;
 }
Index: bonobo/bonobo-marshal.list
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-marshal.list,v
retrieving revision 1.8
diff -u -u -p -b -B -r1.8 bonobo-marshal.list
--- bonobo/bonobo-marshal.list	2001/08/01 02:11:29	1.8
+++ bonobo/bonobo-marshal.list	2001/09/04 21:01:20
@@ -1,15 +1,5 @@
-VOID:POINTER,POINTER
-VOID:POINTER,STRING
-VOID:POINTER,POINTER,POINTER
-VOID:STRING,BOOLEAN
-VOID:POINTER,INT,POINTER
-VOID:STRING,INT,STRING
-VOID:STRING,ENUM,STRING
-POINTER:POINTER,BOOLEAN,POINTER
-BOOLEAN:POINTER
-VOID:STRING,BOXED,POINTER
-VOID:BOXED,UINT,POINTER
-BOXED:STRING,BOOLEAN,POINTER,POINTER
-POINTER:POINTER,POINTER
-BOXED:POINTER,STRING,BOXED
-POINTER:STRING
+VOID:OBJECT,BOXED
+BOXED:STRING,BOOLEAN,BOXED
+VOID:STRING,BOXED,BOXED
+VOID:BOXED,UINT,BOXED
+OBJECT:STRING
Index: bonobo/bonobo-moniker-simple.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-moniker-simple.c,v
retrieving revision 1.12
diff -u -u -p -b -B -r1.12 bonobo-moniker-simple.c
--- bonobo/bonobo-moniker-simple.c	2001/08/01 02:11:29	1.12
+++ bonobo/bonobo-moniker-simple.c	2001/09/04 21:01:20
@@ -19,6 +19,50 @@ struct _BonoboMonikerSimplePrivate {
 	GClosure *resolve_closure;
 };
 
+static void
+bonobo_marshal_BOXED__RESOLVEOPTIONS_STRING_BOXED (GClosure     *closure,
+						   GValue       *return_value,
+						   guint         n_param_values,
+						   const GValue *param_values,
+						   gpointer      invocation_hint,
+						   gpointer      marshal_data)
+{
+	typedef gpointer (*GMarshalFunc_BOXED__POINTER_STRING_BOXED) (gpointer     data1,
+								      gpointer     arg_1,
+								      gpointer     arg_2,
+								      gpointer     arg_3,
+								      gpointer     data2);
+	register GMarshalFunc_BOXED__POINTER_STRING_BOXED callback;
+	register GCClosure *cc = (GCClosure*) closure;
+	register gpointer data1, data2;
+	Bonobo_ResolveOptions resopt;
+	gpointer v_return;
+
+	g_return_if_fail (return_value != NULL);
+	g_return_if_fail (n_param_values == 5);
+
+	if (G_CCLOSURE_SWAP_DATA (closure)) {
+		data1 = closure->data;
+		data2 = g_value_peek_pointer (param_values + 0);
+	} else {
+		data1 = g_value_peek_pointer (param_values + 0);
+		data2 = closure->data;
+	}
+	callback = (GMarshalFunc_BOXED__POINTER_STRING_BOXED) (marshal_data ? marshal_data : cc->callback);
+
+	resopt.flags = g_value_get_flags (param_values + 1) ?
+		Bonobo_MONIKER_ALLOW_USER_INTERACTION : 0;
+	resopt.timeout = g_value_get_long (param_values + 2);
+
+	v_return = callback (data1,
+			     &resopt,
+			     (char*) g_value_get_string (param_values + 3),
+			     g_value_get_boxed (param_values + 4),
+			     data2);
+
+	g_value_set_boxed_take_ownership (return_value, v_return);
+}
+
 static Bonobo_Unknown
 simple_resolve (BonoboMoniker               *moniker,
 		const Bonobo_ResolveOptions *options,
@@ -26,25 +70,26 @@ simple_resolve (BonoboMoniker           
 		CORBA_Environment           *ev)
 {
 	BonoboMonikerSimple *simple;
-	GValue               value = { 0, };
 	Bonobo_Unknown       ret;
+	Bonobo_ResolveFlag   resolve_flag;
+	glong                timeout;
 
 	g_return_val_if_fail (BONOBO_IS_MONIKER_SIMPLE (moniker),
 			      CORBA_OBJECT_NIL);
 
 	simple = BONOBO_MONIKER_SIMPLE (moniker);
 
-	g_value_init (&value, BONOBO_TYPE_CORBA_OBJECT);
+	resolve_flag = options ? options->flags : 0;
+	timeout = options ? options->timeout : -1;
 
 	bonobo_closure_invoke (simple->priv->resolve_closure,
-			       &value,
+			       BONOBO_TYPE_CORBA_OBJECT, &ret,
 			       BONOBO_MONIKER_TYPE, moniker,
-			       G_TYPE_POINTER, options,
-			       G_TYPE_STRING, requested_interface,
-			       BONOBO_TYPE_CORBA_EXCEPTION, ev, 0);
-
-	ret = bonobo_value_get_corba_object (&value);
-	g_value_unset (&value);
+			       BONOBO_RESOLVE_FLAG_TYPE, resolve_flag,
+			       G_TYPE_LONG, timeout,
+			       BONOBO_TYPE_STRING, requested_interface,
+			       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+			       0);
 	
 	return ret;
 }
@@ -104,7 +149,7 @@ bonobo_moniker_simple_construct (BonoboM
 	g_return_val_if_fail (resolve_closure != NULL, NULL);
 
 	moniker->priv->resolve_closure =
-		bonobo_closure_store (resolve_closure, bonobo_marshal_BOXED__POINTER_STRING_BOXED);
+		bonobo_closure_store (resolve_closure, bonobo_marshal_BOXED__RESOLVEOPTIONS_STRING_BOXED);
 	
 	return bonobo_moniker_construct (
 		BONOBO_MONIKER (moniker), name);
@@ -117,6 +162,9 @@ bonobo_moniker_simple_construct (BonoboM
  * 
  * Create a new instance of a simplified moniker.
  * 
+ * Instead of the Bonobo_ResolveOptions struct, the closure takes its
+ * contents as two arguments: BONOBO_RESOLVE_FLAG_TYPE and G_TYPE_LONG.
+ * 
  * Return value: the moniker object
  **/
 BonoboMoniker *
@@ -149,4 +197,23 @@ bonobo_moniker_simple_new (const char   
 		name, g_cclosure_new (G_CALLBACK (resolve_fn), NULL, NULL));
 }
 
+GType
+bonobo_resolve_flag_get_type (void)
+{
+	static GType resolve_flag_type = 0;
+	static GFlagsValue resolve_flag_values[] = {
+		{
+			Bonobo_MONIKER_ALLOW_USER_INTERACTION,
+			"bonobo-moniker-allow-user-interaction",
+			"bonobo-moniker-allow-user-interaction"
+		}, {
+			0, NULL, NULL
+		}
+	};
+
+	if (!resolve_flag_type)
+		resolve_flag_type = g_flags_register_static
+			("BonoboResolveFlag", resolve_flag_values);
 
+	return resolve_flag_type;
+}
Index: bonobo/bonobo-moniker-simple.h
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-moniker-simple.h,v
retrieving revision 1.9
diff -u -u -p -b -B -r1.9 bonobo-moniker-simple.h
--- bonobo/bonobo-moniker-simple.h	2001/08/08 05:15:46	1.9
+++ bonobo/bonobo-moniker-simple.h	2001/09/04 21:01:20
@@ -21,6 +21,9 @@ G_BEGIN_DECLS
 #define BONOBO_IS_MONIKER_SIMPLE(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), BONOBO_MONIKER_SIMPLE_TYPE))
 #define BONOBO_IS_MONIKER_SIMPLE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), BONOBO_MONIKER_SIMPLE_TYPE))
 
+#define BONOBO_RESOLVE_FLAG_TYPE          (bonobo_resolve_flag_get_type ())
+GType bonobo_resolve_flag_get_type (void) G_GNUC_CONST;
+
 typedef struct _BonoboMonikerSimple        BonoboMonikerSimple;
 typedef struct _BonoboMonikerSimplePrivate BonoboMonikerSimplePrivate;
 
Index: bonobo/bonobo-object.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-object.c,v
retrieving revision 1.120
diff -u -u -p -b -B -r1.120 bonobo-object.c
--- bonobo/bonobo-object.c	2001/08/27 17:17:08	1.120
+++ bonobo/bonobo-object.c	2001/09/04 21:01:22
@@ -663,8 +663,10 @@ bonobo_object_class_init (BonoboObjectCl
 			      G_SIGNAL_RUN_LAST,
 			      G_STRUCT_OFFSET (BonoboObjectClass,system_exception),
 			      NULL, NULL,
-			      bonobo_marshal_VOID__POINTER_POINTER,
-			      G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_POINTER);
+			      bonobo_marshal_VOID__OBJECT_BOXED,
+			      G_TYPE_NONE, 2,
+			      BONOBO_OBJECT_TYPE | G_SIGNAL_TYPE_STATIC_SCOPE,
+			      BONOBO_TYPE_CORBA_EXCEPTION);
 
 	klass->destroy = bonobo_object_dummy_destroy;
 
Index: bonobo/bonobo-property-bag.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-property-bag.c,v
retrieving revision 1.69
diff -u -u -p -b -B -r1.69 bonobo-property-bag.c
--- bonobo/bonobo-property-bag.c	2001/08/17 21:03:09	1.69
+++ bonobo/bonobo-property-bag.c	2001/09/04 21:01:22
@@ -155,7 +155,6 @@ impl_Bonobo_PropertyBag_getValue (Portab
 	BonoboPropertyBag *pb = BAG_FROM_SERVANT (servant);
 	BonoboProperty          *prop;
 	BonoboArg               *arg;
-	GValue			 retval;
 
 	prop = g_hash_table_lookup (pb->priv->prop_hash, key);
 
@@ -164,18 +163,13 @@ impl_Bonobo_PropertyBag_getValue (Portab
 		return NULL;
 	}
 
-	retval.g_type = 0;
-	g_value_init (&retval, BONOBO_TYPE_CORBA_ANY);
-
 	bonobo_closure_invoke (prop->priv->get_prop,
-			       &retval,
+			       BONOBO_TYPE_CORBA_ANY,       &arg,
 			       BONOBO_PROPERTY_BAG_TYPE,   pb,
 			       BONOBO_TYPE_CORBA_TYPECODE, prop->type,
 			       G_TYPE_UINT,                prop->idx,
-			       G_TYPE_POINTER,             ev, 0);
-
-	arg = bonobo_value_get_corba_any (&retval);
-	g_value_unset (&retval);
+			       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+			       0);
 
 	return arg;
 }
@@ -206,24 +200,18 @@ impl_Bonobo_PropertyBag_getValues (Porta
 	for (curr = props; curr != NULL; curr = curr->next) {
 		BonoboProperty *prop = curr->data;
 		BonoboArg *arg;
-		GValue retval;
 
 		set->_buffer [set->_length].name =  
 			CORBA_string_dup (prop->name);
 
-		retval.g_type = 0;
-		g_value_init (&retval, BONOBO_TYPE_CORBA_ANY);
-
 		bonobo_closure_invoke (prop->priv->get_prop,
-				       &retval,
+				       BONOBO_TYPE_CORBA_ANY,       &arg,
 				       BONOBO_PROPERTY_BAG_TYPE,   pb,
 				       BONOBO_TYPE_CORBA_TYPECODE, prop->type,
 				       G_TYPE_UINT,                prop->idx,
-				       G_TYPE_POINTER,             ev, 0);
+				       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+				       0);
 
-		arg = bonobo_value_get_corba_any (&retval);
-		g_value_unset (&retval);
-
 		set->_buffer [set->_length].value = *arg;
 
 		set->_length++;
@@ -256,11 +244,12 @@ impl_Bonobo_PropertyBag_setValue (Portab
 	}
 
 	bonobo_closure_invoke (prop->priv->set_prop,
-			       NULL,
+			       G_TYPE_NONE,
 			       BONOBO_PROPERTY_BAG_TYPE, pb,
 			       BONOBO_TYPE_CORBA_ANY,    value,
 			       G_TYPE_UINT,              prop->idx,
-			       G_TYPE_POINTER,           ev, 0);
+			       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+			       0);
 
 	if (prop->flags & Bonobo_PROPERTY_NO_AUTONOTIFY)
 		return;
@@ -302,11 +291,12 @@ impl_Bonobo_PropertyBag_setValues (Porta
 					    set->_buffer [i].name);
 		
 		bonobo_closure_invoke (prop->priv->set_prop,
-				       NULL,
+				       G_TYPE_NONE,
 				       BONOBO_PROPERTY_BAG_TYPE, pb,
 				       BONOBO_TYPE_CORBA_ANY,   &set->_buffer [i].value,
 				       G_TYPE_UINT,              prop->idx,
-				       G_TYPE_POINTER,           ev, 0);
+				       BONOBO_TYPE_CORBA_EXCEPTION, ev,
+				       0);
 
 		if (BONOBO_EX (ev))
 			return;
@@ -394,19 +384,19 @@ impl_Bonobo_PropertyBag_getFlags (Portab
  */
 
 static void
-bonobo_marshal_ANY__TYPECODE_UINT_POINTER (GClosure     *closure,
+bonobo_marshal_ANY__TYPECODE_UINT_EXCEPTION (GClosure     *closure,
 					   GValue       *return_value,
 					   guint         n_param_values,
 					   const GValue *param_values,
 					   gpointer      invocation_hint,
 					   gpointer      marshal_data)
 {
-	typedef void (*GMarshalFunc_VOID__BOXED_UINT_POINTER) (gpointer     data1,
+	typedef void (*GMarshalFunc_VOID__BOXED_UINT_BOXED) (gpointer     data1,
 							       gpointer     arg_1,
 							       guint        arg_2,
 							       gpointer     arg_3,
 							       gpointer     data2);
-	register GMarshalFunc_VOID__BOXED_UINT_POINTER callback;
+	register GMarshalFunc_VOID__BOXED_UINT_BOXED callback;
 	register GCClosure *cc = (GCClosure*) closure;
 	register gpointer data1, data2;
 	CORBA_TypeCode tc;
@@ -421,7 +411,7 @@ bonobo_marshal_ANY__TYPECODE_UINT_POINTE
 		data1 = g_value_peek_pointer (param_values + 0);
 		data2 = closure->data;
 	}
-	callback = (GMarshalFunc_VOID__BOXED_UINT_POINTER) (marshal_data ? marshal_data : cc->callback);
+	callback = (GMarshalFunc_VOID__BOXED_UINT_BOXED) (marshal_data ? marshal_data : cc->callback);
 
 	tc = bonobo_value_get_corba_typecode (param_values + 1);
 	any = bonobo_arg_new (tc);
@@ -430,7 +420,7 @@ bonobo_marshal_ANY__TYPECODE_UINT_POINTE
 	callback (data1,
 		  any,
 		  g_value_get_uint (param_values + 2),
-		  g_value_get_pointer (param_values + 3),
+		  g_value_peek_pointer (param_values + 3),
 		  data2);
 
 	g_value_set_boxed_take_ownership (return_value, any);
@@ -459,8 +449,8 @@ bonobo_property_bag_construct (BonoboPro
 			       BonoboEventSource *es)
 {
 	pb->es             = es;
-	pb->priv->get_prop = bonobo_closure_store (get_prop, bonobo_marshal_ANY__TYPECODE_UINT_POINTER);
-	pb->priv->set_prop = bonobo_closure_store (set_prop, bonobo_marshal_VOID__BOXED_UINT_POINTER);
+	pb->priv->get_prop = bonobo_closure_store (get_prop, bonobo_marshal_ANY__TYPECODE_UINT_EXCEPTION);
+	pb->priv->set_prop = bonobo_closure_store (set_prop, bonobo_marshal_VOID__BOXED_UINT_BOXED);
 
 	bonobo_object_add_interface (BONOBO_OBJECT (pb), BONOBO_OBJECT (es));
 	
@@ -644,8 +634,9 @@ bonobo_property_bag_add_full (BonoboProp
 	prop->doctitle       = g_strdup (doctitle);
 
 	prop->priv = g_new0 (BonoboPropertyPrivate, 1);
-	prop->priv->get_prop = bonobo_closure_store (get_prop, bonobo_marshal_ANY__TYPECODE_UINT_POINTER);
-	prop->priv->set_prop = bonobo_closure_store (set_prop, bonobo_marshal_VOID__BOXED_UINT_POINTER);
+	prop->priv->get_prop = bonobo_closure_store (get_prop, bonobo_marshal_ANY__TYPECODE_UINT_EXCEPTION);
+	prop->priv->set_prop = bonobo_closure_store (set_prop, bonobo_marshal_VOID__BOXED_UINT_BOXED);
+
 
 	if (default_value)
 		prop->default_value = bonobo_arg_copy (default_value);
Index: bonobo/bonobo-types.c
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-types.c,v
retrieving revision 1.14
diff -u -u -p -b -B -r1.14 bonobo-types.c
--- bonobo/bonobo-types.c	2001/08/08 23:16:15	1.14
+++ bonobo/bonobo-types.c	2001/09/04 21:01:23
@@ -231,6 +231,7 @@ corba_any_init (void)
 static gpointer
 corba_any_copy (gpointer any)
 {
+	g_warning (G_STRLOC);
 	return bonobo_arg_copy (any);
 }
 
@@ -246,13 +247,14 @@ bonobo_corba_any_get_type (void)
 	static GType type = 0;
 	if (!type)
 		type = g_boxed_type_register_static ("BonoboCorbaAny", corba_any_init,
-						     corba_any_copy, corba_any_free, TRUE);
+						     corba_any_copy, corba_any_free, FALSE);
 	return type;
 }
 
 static gpointer
 corba_typecode_copy (gpointer typecode)
 {
+	g_warning (G_STRLOC);
 	CORBA_Object_duplicate ((CORBA_Object) typecode, NULL);
 	return typecode;
 }
@@ -260,6 +262,7 @@ corba_typecode_copy (gpointer typecode)
 static void
 corba_typecode_free (gpointer typecode)
 {
+	g_warning (G_STRLOC);
 	CORBA_Object_release ((CORBA_Object) typecode, NULL);
 }
 
@@ -269,7 +272,7 @@ bonobo_corba_typecode_get_type (void)
 	static GType type = 0;
 	if (!type)
 		type = g_boxed_type_register_static ("BonoboCorbaTypecode", NULL,
-						     corba_typecode_copy, corba_typecode_free, TRUE);
+						     corba_typecode_copy, corba_typecode_free, FALSE);
 	return type;
 }
 
@@ -302,6 +305,8 @@ corba_exception_copy (gpointer any)
 {
 	CORBA_Environment *src, *dest;
 
+	g_warning (G_STRLOC);
+
 	src = any;
 	dest = CORBA_exception__alloc ();
 	if (src->_major != CORBA_NO_EXCEPTION) {
@@ -324,7 +329,7 @@ bonobo_corba_exception_get_type (void)
 	static GType type = 0;
 	if (!type)
 		type = g_boxed_type_register_static ("BonoboCorbaException", corba_exception_init,
-						     corba_exception_copy, corba_exception_free, TRUE);
+						     corba_exception_copy, corba_exception_free, FALSE);
 	return type;
 }
 
@@ -382,27 +387,80 @@ bonobo_value_get_corba_exception (const 
 }
 
 void
+bonobo_value_set_unknown (GValue *value, const Bonobo_Unknown unknown)
+{
+	g_return_if_fail (BONOBO_VALUE_HOLDS_UNKNOWN (value));
+  
+	if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
+		bonobo_object_release_unref (value->data[0].v_pointer, NULL);
+	value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
+	value->data[0].v_pointer = unknown;
+}
+
+void
+bonobo_value_set_corba_any (GValue *value, const CORBA_any *any)
+{
+	g_return_if_fail (BONOBO_VALUE_HOLDS_CORBA_ANY (value));
+  
+	if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
+		bonobo_arg_release (value->data[0].v_pointer);
+	value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
+	value->data[0].v_pointer = (CORBA_any *) any;
+}
+
+void
+bonobo_value_set_corba_typecode (GValue *value, const CORBA_TypeCode tc)
+{
+}
+
+void
+bonobo_value_set_corba_environment (GValue *value, const CORBA_Environment *ev)
+{
+}
+
+void
 bonobo_closure_invoke_va_list (GClosure *closure,
-			       GValue   *retval,
-			       GType     first_type,
+			       GType     return_type,
 			       va_list   var_args)
 {
 	GArray *params;
-	GType   type;
+	GValue    return_value = { 0, };
+	gpointer  retloc_ptr = var_args;
+	GType     type, rtype;
 	int     i;
   
 	g_return_if_fail (closure != NULL);
 
 	params = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 6);
+
+	rtype = return_type & ~G_SIGNAL_TYPE_STATIC_SCOPE;
+	if (rtype != G_TYPE_NONE) {
+		gchar *error;
+
+		g_value_init (&return_value, rtype);
 
-	for (type = first_type; type; type = va_arg (var_args, GType)) {
+		/* Initialize return value */
+		G_VALUE_LCOPY (&return_value, var_args,
+			       G_VALUE_NOCOPY_CONTENTS, &error);
+
+		if (error) {
+			g_warning ("%s: %s", G_STRLOC, error);
+			g_free (error);
+			return;
+		}
+	}
+
+	while ((type = va_arg (var_args, GType)) != 0) {
+		gboolean static_scope = type & G_SIGNAL_TYPE_STATIC_SCOPE;
 		GValue value;
 		gchar *error;
 
 		value.g_type = 0;
-		g_value_init  (&value, type);
+		g_value_init  (&value, type & ~G_SIGNAL_TYPE_STATIC_SCOPE);
 
-		G_VALUE_COLLECT (&value, var_args, 0, &error);
+		G_VALUE_COLLECT (&value, var_args,
+				 static_scope ? G_VALUE_NOCOPY_CONTENTS : 0,
+				 &error);
 		if (error) {
 			g_warning ("%s: %s", G_STRLOC, error);
 			g_free (error);
@@ -413,11 +471,30 @@ bonobo_closure_invoke_va_list (GClosure 
 	}
 
 	g_closure_invoke (closure,
-			  retval,
+			  &return_value,
 			  params->len,
 			  (GValue *)params->data,
 			  NULL);
 
+	if (rtype != G_TYPE_NONE) {
+		gchar *error;
+		
+		/* We use G_VALUE_NOCOPY_CONTENTS here so that the caller
+		 * takes ownership of the return value; thus we must not
+		 * g_value_unset() it here.
+		 */
+
+		G_VALUE_LCOPY (&return_value, retloc_ptr,
+			       G_VALUE_NOCOPY_CONTENTS,
+			       &error);
+
+		if (error) {
+			g_warning ("%s: %s", G_STRLOC, error);
+			g_free (error);
+			return;
+		}
+	}
+
 	for (i = 0; i < params->len; i++)
 		g_value_unset (&g_array_index (params, GValue, i));
 }
@@ -425,17 +502,22 @@ bonobo_closure_invoke_va_list (GClosure 
 /**
  * bonobo_closure_invoke:
  * @closure: a standard GClosure
- * @return_value: a pointer to the return value ie. &my_int
- * @return_type: the return type.
- * @first_type: the type of the first va_arg argument in a
+ * @return_type: the type of the first va_arg argument in a
  * set of type / arg pairs.
  * 
  * Invokes the closure with the arguments.
+ *
+ * Example:
+ *
+ *    bonobo_closure_invoke (closure, G_TYPE_NONE, G_TYPE_INT, first_arg, 0);
+ *
+ *    glong retval;
+ *    bonobo_closure_invoke (closure, G_TYPE_LONG, &retval, 0);
+ *
  **/
 void
 bonobo_closure_invoke (GClosure *closure,
-		       GValue   *retval,
-		       GType     first_type,
+		       GType     return_type,
 		       ...)
 {
 	va_list var_args;
@@ -443,10 +525,10 @@ bonobo_closure_invoke (GClosure *closure
 	if (!closure)
 		return;
 
-	va_start (var_args, first_type);
+ 	va_start (var_args, return_type);
 	
 	bonobo_closure_invoke_va_list (
-		closure, retval, first_type, var_args);
+		closure, return_type, var_args);
 
 	va_end (var_args);
 }
Index: bonobo/bonobo-types.h
===================================================================
RCS file: /cvs/gnome/libbonobo/bonobo/bonobo-types.h,v
retrieving revision 1.6
diff -u -u -p -b -B -r1.6 bonobo-types.h
--- bonobo/bonobo-types.h	2001/08/08 15:16:12	1.6
+++ bonobo/bonobo-types.h	2001/09/04 21:01:23
@@ -28,32 +28,50 @@ GType bonobo_corba_object_get_type      
 GType bonobo_corba_typecode_get_type                (void) G_GNUC_CONST;
 GType bonobo_corba_exception_get_type               (void) G_GNUC_CONST;
 
-#define BONOBO_TYPE_UNKNOWN                         (bonobo_unknown_get_type ())
-#define BONOBO_TYPE_CORBA_ANY                       (bonobo_corba_any_get_type ())
-#define BONOBO_TYPE_CORBA_OBJECT                    (bonobo_corba_object_get_type ())
-#define BONOBO_TYPE_CORBA_TYPECODE                  (bonobo_corba_typecode_get_type ())
-#define BONOBO_TYPE_CORBA_EXCEPTION                 (bonobo_corba_exception_get_type ())
-
-#define BONOBO_VALUE_HOLDS_UNKNOWN(value)           (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_UNKNOWN))
-#define BONOBO_VALUE_HOLDS_CORBA_ANY(value)         (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_CORBA_ANY))
-#define BONOBO_VALUE_HOLDS_CORBA_OBJECT(value)      (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_CORBA_OBJECT))
-#define BONOBO_VALUE_HOLDS_CORBA_TYPECODE(value)    (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_CORBA_TYPECODE))
-#define BONOBO_VALUE_HOLDS_CORBA_EXCEPTION(value)   (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_CORBA_EXCEPTION))
+#define BONOBO_TYPE_UNKNOWN                         (bonobo_unknown_get_type () | G_SIGNAL_TYPE_STATIC_SCOPE)
+#define BONOBO_TYPE_CORBA_ANY                       (bonobo_corba_any_get_type () | G_SIGNAL_TYPE_STATIC_SCOPE)
+#define BONOBO_TYPE_CORBA_OBJECT                    (bonobo_corba_object_get_type () | G_SIGNAL_TYPE_STATIC_SCOPE)
+#define BONOBO_TYPE_CORBA_TYPECODE                  (bonobo_corba_typecode_get_type () | G_SIGNAL_TYPE_STATIC_SCOPE)
+#define BONOBO_TYPE_CORBA_EXCEPTION                 (bonobo_corba_exception_get_type () | G_SIGNAL_TYPE_STATIC_SCOPE)
 
+#define BONOBO_TYPE_STRING                          (G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE)
+
+#define BONOBO_TYPE_NONSTATIC_UNKNOWN               (bonobo_unknown_get_type ())
+#define BONOBO_TYPE_NONSTATIC_CORBA_ANY             (bonobo_corba_any_get_type ())
+#define BONOBO_TYPE_NONSTATIC_CORBA_OBJECT          (bonobo_corba_object_get_type ())
+#define BONOBO_TYPE_NONSTATIC_CORBA_TYPECODE        (bonobo_corba_typecode_get_type ())
+#define BONOBO_TYPE_NONSTATIC_CORBA_EXCEPTION       (bonobo_corba_exception_get_type ())
+
+#define BONOBO_VALUE_HOLDS_UNKNOWN(value)           (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_NONSTATIC_UNKNOWN))
+#define BONOBO_VALUE_HOLDS_CORBA_ANY(value)         (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_NONSTATIC_CORBA_ANY))
+#define BONOBO_VALUE_HOLDS_CORBA_OBJECT(value)      (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_NONSTATIC_CORBA_OBJECT))
+#define BONOBO_VALUE_HOLDS_CORBA_TYPECODE(value)    (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_NONSTATIC_CORBA_TYPECODE))
+#define BONOBO_VALUE_HOLDS_CORBA_EXCEPTION(value)   (G_TYPE_CHECK_VALUE_TYPE ((value), BONOBO_TYPE_NONSTATIC_CORBA_EXCEPTION))
+
 Bonobo_Unknown     bonobo_value_get_unknown         (const GValue *value);
 BonoboArg         *bonobo_value_get_corba_any       (const GValue *value);
 CORBA_Object       bonobo_value_get_corba_object    (const GValue *value);
 CORBA_TypeCode     bonobo_value_get_corba_typecode  (const GValue *value);
 CORBA_Environment *bonobo_value_get_corba_exception (const GValue *value);
 
+void bonobo_value_set_unknown            (GValue                      *value,
+                                          const Bonobo_Unknown         unknown);
+
+void bonobo_value_set_corba_any          (GValue                      *value,
+                                          const CORBA_any             *any);
+
+void bonobo_value_set_corba_typecode     (GValue                      *value,
+                                          const CORBA_TypeCode         tc);
+
+void bonobo_value_set_corba_environment  (GValue                      *value,
+                                          const CORBA_Environment     *ev);
+
 void       bonobo_closure_invoke_va_list            (GClosure            *closure,
-						     GValue              *retval,
-						     GType                first_type,
+						     GType                return_type,
 						     va_list              var_args);
 
 void       bonobo_closure_invoke		    (GClosure            *closure,
-						     GValue              *retval,
-						     GType                first_type,
+						     GType                return_type,
 						     ...);
 
 GClosure * bonobo_closure_store                     (GClosure            *closure,
Index: tests/test-moniker.c
===================================================================
RCS file: /cvs/gnome/libbonobo/tests/test-moniker.c,v
retrieving revision 1.17
diff -u -u -p -b -B -r1.17 test-moniker.c
--- tests/test-moniker.c	2001/08/01 02:14:01	1.17
+++ tests/test-moniker.c	2001/09/04 21:01:23
@@ -92,7 +92,7 @@ main (int argc, char *argv [])
 
 	check_parse_name ("a:#b:", "b:", 2);
 
-	check_parse_name ("a:!b:", "b:", 2);
+	check_parse_name ("a:!b:", "!b:", 2);
 
 	check_parse_name ("a:3456789#b:", "b:", 9);
 
This patch also needs some modifications in libbonoboui which mostly done
in my local tree (added bonobo-ui-marshal.list and reflect the changed
bonobo_closure_invoke() API), but I'd like to have a second look at them
before I commit, so I'll do this tomorrow morning.

(Michael, I'll send you the final patch tomorrow since I may need to make
minor modifications to it before I commit. If anyone else on the list wants
to see the patch again, lemme know).

-- 
Martin Baulig
martin gnome org (private)
baulig suse de (work)


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