Re: ORBit_sequence helpers ...

	In my _personal_ opinion, the use of ORBit APIs should be minimized in
GNOME.  One of the great things about CORBA is that it is vastly
documented, making CORBA code readable to programmers outside the GNOME
project.  By using ORBit APIs, the code may become simpler or with
better performance, but also less readable[1].  In addition, because of
this, some people will acuse bonobo of being too much tied to ORBit.
	Just some thoughts...

[1] though not in this case in particular, since the function names are
self-descriptive; however, there are other cases where ORBit internal
APIs are used, and it's hard to know what they mean.

On Ter, 2003-03-11 at 14:56, Michael Meeks wrote:
> Hi guys,
> 	So - I just added a set of 'ORBit_sequence' helpers to HEAD; they do
> helpful things:
> /* More friendly(?) sequence allocators */
> gpointer       ORBit_sequence_alloc    (CORBA_TypeCode      sequence_tc,
> 					CORBA_unsigned_long length);
> void           ORBit_sequence_append   (gpointer            sequence,
> 					gconstpointer       element);
> void           ORBit_sequence_set_size (gpointer            sequence,
> 					CORBA_unsigned_long length);
> #define        ORBit_sequence_index(sequence,idx)
> (sequence)->_buffer[(idx)]
> void           ORBit_sequence_concat   (gpointer            sequence,
> 					gconstpointer       append);
> 	Which should make a sequence approaching as friendly as a GArray, that
> should clean some nasty cruft out of bonobo-activation at least - with
> GLists' being turned into sequences later etc. etc.
> 	The patch is: 
> 	I'm slightly concerned that I'm mis-using _maximum - is that supposed
> to be a 'bounded sequence' thing ? either way - we can trivially support
> the API by using the smart allocation n_elements stuff with a little
> more work.
> 	If anyone wants other Sequence / GArray type methods - speak soon ...
> 	HTH,
> 		Michael.
Gustavo Joćo Alves Marques Carneiro
<> <>

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