Re: ORBit2 issues (was Re: ORBit 0.5.15 any problem?)



Hi Huw,

On Mon, 2002-05-27 at 14:48, Huw Rogers wrote:
> In ORBit2, revisions 1.31/1.32 of corba-typecode.c
> and revision 1.14 of corba-typecode.h created this problem by redefining
> the sublabels[] array of a union as an array of CORBA_long (32bits) (was
> previously an array of CORBA_any).

	Yes - and it really, really sucked for performance.

> cvs -z3 diff -r1.13 -r1.14 corba-typecode.h
> 
> a CORBA_long is insufficient to hold a CORBA_long_long or a
> CORBA_unsigned_long_long discriminator value.
>
> So if the union discriminator is >32 bits,

	So you want to have > 4bn^2 elements in your union ? or you want to do
some really, really funky binary stuff on the wire - of highly dubious
merit.

> and one of the cases of the union is a >32bit constant (one of the
> sublabels), then there will be a problem.

	Why would you possibly, ever, ever want that ?

> union u switch(unsigned long long) {
> case 0x0000000000000001: string s;
> case 0x0000000100000001: short h;

	I take your point that this won't work - why would you possibly want it
to ? why would you want to pay the horrible cost of storing the
enumeration as an any ? why pay the space penalty of a 64 bit number,
and the time penalty of a 64 bit compare, when this case is never going
to occur ?

	Quite why that was ever introduced into the spec is a total mystery to
me.

	Regards,

		Michael.

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




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