marshal_arg bug ...



Hi there,

	It seems my union problems were down to a bug in the union
marshaller - this seems to fix it:

2001-03-20  Michael Meeks  <michael ximian com>

	* corba_any.c (ORBit_marshal_value): CORBA_tk_union, fix
	pointer arithemtic issues.

Index: corba_any.c
===================================================================
RCS file: /cvs/gnome/ORBit/src/orb/corba_any.c,v
retrieving revision 1.32.4.3
diff -u -r1.32.4.3 corba_any.c
--- corba_any.c	2001/03/09 09:25:08	1.32.4.3
+++ corba_any.c	2001/03/20 20:42:01
@@ -90,7 +90,7 @@
     }
 }
 
-static void
+void
 ORBit_marshal_value(GIOPSendBuffer *buf,
 		    gpointer *val,
 		    CORBA_TypeCode tc,
@@ -180,10 +180,8 @@
 	    CORBA_TypeCode utc;
 
 	    *val = ALIGN_ADDRESS(*val, ALIGNOF_CORBA_STRUCT);
-
-	    utc = ORBit_get_union_tag(tc, val, TRUE);
 
-	    *val = ALIGN_ADDRESS(*val, ALIGNOF_CORBA_STRUCT);
+	    utc = ORBit_get_union_tag(tc, val, FALSE);
 
 	    ORBit_marshal_value(buf, val, tc->discriminator, mi);
 	    *val = ALIGN_ADDRESS(*val, ORBit_find_alignment(tc));

	May I commit ?

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot





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