ORBit_sequence helpers ...
- From: Michael Meeks <michael ximian com>
- To: Mark McLoughlin <mark mcloughlin sun com>
- Cc: orbit <orbit-list gnome org>,Anders Carlsson <andersca codefactory se>
- Subject: ORBit_sequence helpers ...
- Date: 11 Mar 2003 14:56:16 +0000
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:
http://primates.ximian.com/~michael/sequence-helpers.diff
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.
--
mmeeks@gnu.org <><, Pseudo Engineer, itinerant idiot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]