Re: sequence allocation

i answer to myself :-) 

I used the non-existing function to allocate the sequence,

> retval->_buffer= CORBA_sequence_VSERV_image_bytevect_allocbuf(2);

and for some reason, didn't get a link error message :
my Makefile was not reliable.

I must say the C-mapping specs from OMG are quite sketchy :
it says something like "use CORBA_sequence_T_allocbuf( ) to 
allocate a sequence of type T". 

For my first try i used the name of the typdef, so for the idl 
> module VSERV {
>       interface image {
>             typedef sequence<octet> bytevect;
>             bytevect readpixel (out short width,out short height);
>       };
> };
i used VSERV_image_bytevect. 
But poking in sources generated by ORBit, i turned out that the 
mapping to use is :

> retval->_buffer= CORBA_sequence_CORBA_octet_allocbuf(2);

So, the T type is CORBA_octet.

Sorry for these beginners comments, but maybe it will help
someone in the future as documentaiton on C-mappings (except
the formal document not too helpfull) is extremely hard to find.



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