Re: a patch and a question



Hi Rodrigo,

On 20 Aug 2001, Rodrigo Moya wrote:
> While dealing with CORBA_any's and Typecodes, I've found useful to add
> more GET/SET macros to the BonoboArg stuff, so here's a patch which
> adds a few of them. If you find it useful, I'll add for other type
> codes.

        Looks fine - please commit to libbonobo.

        As for the struct ... it depends what you want to do with the any;
I would be inclined to do:

        My_Struct a = { 1,2, 4, 17 };
        BonoboArg *arg = bonobo_arg_new (TC_My_Struct);

        arg->_release = FALSE;
        CORBA_free (arg->_value);
        arg->_value = &a;

        But this is only useful if 'arg' is to be used for an 'in'
parameter of a method call; this cannot be returned, so perhaps:

        CORBA_free (arg->_value);
        arg->_value = ORBit_copy_value (&a, TC_My_Struct);

        is better.

        Thanks,

                Michael.

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





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