[omniORB] default any constructor in python

Renzo Tomaselli renzo.tomaselli at tecnotp.it
Fri Apr 8 16:13:34 BST 2005


Well, replying to myself and to anyone interested, the damned trick is:

a = Foo(..., CORBA.Any(CORBA.TC_null, None))

Renzo

Renzo Tomaselli wrote:

> Hi all,
>    perhaps trivial, but what is the equivalent of the C++ default 
> CORBA::Any constructor for OmniORBpy ?
> For an IDL declaration such as: struct Foo {  ...; any value; }, any 
> of the following:
>
> a = Foo(..., CORBA.Any(CORBA.TC_null, 0))
> a = Foo(..., CORBA.Any(CORBA.TC_void, 0))
> a = Foo(..., None)
>
> succeed, but later on we get "omniORB.CORBA.BAD_PARAM: Minor: 
> BAD_PARAM_WrongPythonType" when marshalling a call where such Foo has 
> been put into an any argument.
> Nevertheless there are cases when we want to pass on an empty any, 
> like we can do in C++ by default.
> Thanks,
>
> Renzo Tomaselli
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>



More information about the omniORB-list mailing list